8.11 Data Types and Arithmetic Operators Flashcards
Declaring a Variable - Pseudocode
What datatype is needed for the following variables?
age
name
height
grade
isHungry
INTEGER age
STRING name
REAL height
CHAR grade
BOOLEAN isHungry
Datatypes you need to know
Define these datatypes:
INTEGER
STRING
REAL
CHAR
BOOLEAN
INTEGER - Stores a whole number, such as 3, 45,‐453
STRING - Stores zero or more sequence of characters. Most programming languages have a limit of 255 characters
REAL – Stores integers and numbers with a decimal part e.g. 3 , 3.2, -9.11
CHAR – Stores a single character (can be any letter, digit, punctuation mark or symbol that can be typed)
Boolean - Stores only 2 possible values, either true (1) or false (0)