WorksheetsS3 Python datatypes and variables
Total questions: 24
Worksheet time: 12mins
When storing a value in a variable, the variable must be on which side of the = symbol?
Left
Right
A variable...
Stores a piece of information in memory
Is always a number
stores more than one piece of information
is always text
A variable name can start with a number
True
False
A variable name can include a number as long as it's not the first character
True
False
Select the Integer
2
two
2.0
to
Select the real number
7
Seven
7.0
777
Which data type stores TRUE/FALSE values
Integer
Real
Boolean
Array
Joining different variables together in a print statement using a + symbol, is an example of
Concatenation
Iteration
Subscription
Deletion
What characters can you use to concatenate?
+
,
#
=
== assigns a value to a variable
True
False
Python uses indentation to
indicate a block of code
to make code easier to read
indicate errors
A phone number should be stored in a variable with what data type?
Integer
Float
Boolean
Text
Variables need a meaningful name?
True
False
The value of a variable can change during the execution of a program?
True
False
The data "12 High Street" would be stored in a variable of what data type?
String
Integer
Float
Char
Which of these types of information should be stored in a variable of data type Integer
Phone Number
Post Code
Age
Value of Pi
Which of these types of information should be stored in a variable of data type Float
Phone Number
Post Code
Age
Value of Pi
Which of these types of information should be stored in a variable of data type Boolean
Phone Number
Post Code
TRUE/FALSE
Value of Pi
Which of these types of information should be stored in a variable of data type Char
Phone Number
Post Code
Initial of forename
Value of Pi
"7" could be stored in a variable of type Char?
True
False
"7" could be stored in a variable of type String?
True
False
"7" could be stored in a variable of type Float?
True
False
"7" could be stored in a variable of type Integer?
True
False
A persons name should be stored in a variable as what data type?
String
Char
Float
Integer
