Key Terms Flashcards
What is a constant?
A variable that doesn’t change, doesn’t change in the program
What is a variable?
A value that can change value once imputed into a program
What can data values be stored as?
Constants or variables
What are the 4 types of variables?
Boolean, integers, float, and string
What is the function that changes all characters in a string to upper case?
x.upper
x being the string
What is the function that changes all the characters in a string to lower case?
x.lower
What is the function that returns all characters in a string?
x.length
x.(i) does what?
Extract the character in position (i) from string x
What does the function x.subString(a,b) do? What would the output be if this was ‘hello’?
Extracts part of the string starting at position a and with a length of b. Hello would be ‘lo’
Give an example of a cast? What is a cast?
Str(age)
Where the type of variable is stated
What is DIV?
Where the integer of a calculation is given without its remainder. E.g. 20 DIV 3 is 6
What is MOD?
What the remainder of a calculation is E.g. 20 MOD 3 is 2
What are the 3 types of loops?
While, for and if
How many dimensions of arrays are there?
3
What is an array?
A data structure that consists of a group of elements (values or variables), each identified as an index
A data structure where all the data is stored and defined under one variable