WorksheetsPython - Print & Input Quiz
Total questions: 23
Worksheet time: 14mins
holds whole numbers
holds a decimal point in a number
What data type would be used for storing someone's telephone numbers?
Float (using a decimal point)
Integer (just whole numbers)
String (alphanumerical data)
What does the equal sign mean in this code?
team = input(“Enter a team”)
assignment
equal to
greater than
interger
True or False:
5.0 is an example of the 'float' datatype.
True
False
True or False:
You need to convert an integer to a string before you can use it in the print() function.
True
False
Gjdk is not a good name for a variable, why?
It starts with a capital letter.
It does not contain any spaces.
There are no vowels.
It's meaningless.
In this code, how much does an apple cost?
£1
50p
20p
25p
What would the program display if you ran this code and entered 2 and then 3 when prompted?
The total is 5.
The total is 23.
The total is 6.
An error.
Which symbol is used as an escape character so the computer ignores the next character as syntax
+
-
\
*
Q4. A program runs but it produces the wrong results, what type of error is this?
Syntax error
Logical error
Execution error
Life error
Q4. A program does not run, what type of error is this?
Syntax error
Logical error
Execution error
Life error
what is correct code for a Real number in python?
float
real
flo
rea
