NEW
Font size
WorksheetsPython Quiz Year 8
Total questions: 25
Worksheet time: 14mins
What will be the output of the following?
name = "Dave"
print (name)
Dave
"Dave"
name
(name)
A syntax error could mean your code has a spelling mistake
Which statement correctly assigns the string "Blue" to the variable name?
name = print( "Blue")
input("Blue")
name = "Blue"
name = input("Blue")
It displays an output
What is the output from the following code?
print ("hello world")
What is the Python built-in function used to display numbers and text on the screen?
input
output
command
What will be the output?
name = "Bob"
print ("name")
Bob
"Bob"
name
"name"
What is a data type than can have one of two values: True or False
boolean
variable
modulo
interpreter
holds whole numbers
holds a decimal point in a number
Which of these functions could convert a number to a string
str()
int()
parseInt()
convert()
To convert to a string, what would I use?
str()
What is python named after....
What data type would age in years be? e.g.24
Integer
Float
Boolean
String
What data type would I use for the value of Pi? e.g. 3.1415
Float
Boolean
Integer
String
On which line is concatenation happening?
Line 2
Line 1
There isn't any!
What data type does Python automatically store the user's input as?
String
Float
Integer
Boolean
What is casting in programming?
Converting one data type into another
Putting different types of data together
Storing data permanently in memory
Saving data so it’s not lost
