2.2 Programming Fundamentals Flashcards
Integer:
Whole number
Real/float:
Decimal numbers
Boolean:
1 of 2 values, true/false, yes/no, 0/1
Character:
Single letter, number or symbol
String:
Used to represent text, collection of characters
Casting:
Change data type
Arithmetic operators:
Take values and perform mathematical functions on them
Exponentiation:
Raise a number to a power. ^, or **
DIV:
Returns the whole number part of a division. // is used
MOD:
Returns the remainder part after division % is used
Assignment:
Allocate values to constants or variables
Comparison operators:
Compare the expression on left side with expression on right. Boolean value
Constant:
A constant is assigned a data value that can’t be changed as the program runs
Variable:
A location in memory that holds 1 or more values. Has a label to identify it and value can be changed as program runs
String manipulation:
Chars in a string numbered starting at 0. Can use commands giving info about the string or allows you to alter the string