2.2.2 Data Types Flashcards
1
Q
Integer code
A
int
2
Q
Real code
A
real
3
Q
What is the real data type also known as
A
Float
4
Q
Boolean code
A
bool
5
Q
Character code
A
char
6
Q
String code
A
str
7
Q
A
8
Q
Integer data type
A
Whole number
9
Q
Real data type
A
Numbers with a decimal part
10
Q
What data type is 100.0
A
Real
11
Q
Boolean data type
A
Can only take one of two values (normally true or false)
12
Q
Character data type
A
A single letter, number or symbol
13
Q
String
A
A collection of characters
14
Q
Which data types need “”
A
Characters and strings
15
Q
Casting
A
A function that lets you manually convert the data type
16
Q
Code for casting
A
datatype()
e.g. int(1)
17
Q
How to convert a character into its ASCII number
A
ASC(the letter)
e.g. ASC(b)
18
Q
How to convert an ASCII number to its character
A
CHR(number)
e.g. CHR(98)