1/44
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Variable
A value that can change while the program is running
Constant
A value that remains fixed and cannot change while the program is running
Assignment
Where you give/assign a value to a variable or constant using the = symbol
Operator
Used on variables and constants to perform mathematical operations
Casting
Converting a variable form one data type to another
Integer
A whole number
Real
A decimal number
Character
A single alphanumeric character
String
Multiple characters
Boolean
True/False values
Input casting
Can be assigned from a string to a number variable
Output statement
Used to output or print to the screen
Sequencing
Executing one instruction after another
Selection
Branching a program based on a condition (if/else)
Iteration
Looping/repeating sections of code (for/while)
Addition
Adding two values using +
Subtraction
Subtracting two values using -
Multiplication
Multiplying two values using *
Division
Dividing two values using /
Exponential
‘To the power of’ using ^
Modulus
‘How many whole numbers are left over after dividing two numbers’ using MOD eg: 7MOD2 = 1 (3 remainder 1)
Integer division
‘How many times a whole number fits into another number using’ DIV eg: 7DIV2 = 3 (3 remainder 1)
Is equal to
==
Is not equal to
!=
Less than
<
Less than or equal to
<=
Greater than
>
Greater than or equal to
>=
String manipulation
The act of manipulating, extracting or changing characters in a string variable
Length
string.length eg: if string == hello, length == 5
Ustring
string.upper eg: if string == hello, string becomes HELLO
Lstring
string.lower eg: if string == Hello, string becomes hello
Substrings
string.substring(starting position, number of characters)
Eg: if string == buenos dias, string.substring(2,3), prints characters ‘eno’
String shift
Shifting a string left or right eg: string.left(3), shifts characters left by 3 places
ASCII characters in strings
ASC(“A”), returns ASCII value of “A”
CHR(65), returns character with ASCII value of 65
SELECT
Selects field to be returned
FROM
Which table in the database
WHERE
Records meet a condition
Array
A variable which can continue more than one data item eg: a list of names
Index
A way of finding a specific item in an array eg: food[0,0] == “apple”
Subprogram
Program within a program
Procedure
Carry out a task and don’t return values
Functions
Carry out a task and return a value
Advantages of subprograms
Easier to write and debug
Easier to test and put into the main body
Random number generation
Random(1,6), generates a random number between 1 and 6 inclusive