Section Five - Programming
No description yet. This curated deck is ready for daily study.
Card preview (24)
True or False? Programming languages have SIX main data types.
False Programming languages have FIVE main data types.
Name the main data types:
Integer Real (or float) Boolean Character String
What is the characteristic of an integer?
Whole numbers only
What is the characteristic of a real/float?
Numbers that have a decimal part
What is the characteristic of a boolean?
Can only take one of two values, usually TRUE or FALSE
What is the characteristic of a character?
A single letter, number, symbol.
What is the characteristic of a string?
Used to represent text, it is a collection of characters
How much memory does an INTEGER typically take up?
2 or 4 bytes
What data type typically takes up 4 or 8 bytes?
Real
How much memory does a BOOLEAN typically take up?
1 bit is needed but 1 byte is actually used
What data type typically takes up 1 byte?
Character
How much memory does a STRING typically take up?
1 byte for every character in the string
What is used to change data types?
Casting
What does the operator ‘==’ mean?
Equal to
What symbol means ‘not equal to’?
!=
What does the operator ‘<=’ mean?
smaller than or equal to
What is the operator ‘=’ used for?
Is used to assign values to constants or variables
What is a constant?
An assigned data value that CAN’T be changed while the program is running
What is a variable?
An assigned data value that CAN be changed while the program is running
What is a string written inside?
Quotation marks
What is concatenation?
Joining strings together to form new strings.
How are the characters in a string numbered?
They are numbered numerically, starting at 0.
What does the function x.upper do?
Changes all characters in string x to upper case
What function would turn all the characters in string x to lower case?
x.lower