Data Types Flashcards
1
Q
What is an Integer?
A
A Whole Number, e.g. 6
2
Q
What is A Boolean?
A
A data type which is used for binary variables that can have one of two possible values, 0 (false) or 1 (true)
3
Q
What is a Float?
A
A data type used for used for floating-point numbers which means they have a number that has a decimal place, e.g. 6.5
4
Q
What is a String?
A
A data type used for data values that are made up of ordered sequences of characters, e.g. Hello
5
Q
How would you make a 4.3 float to an integer?
A
int(4.3)
6
Q
How would you make a 5 integer into a float?
A
float(5)