NEW
Font size
S
M
L
XL
WorksheetsPython
Total questions: 13
Worksheet time: 7mins
Name
Class
Date
1.
What is a variable?
a)
A box(memory location) where you store values
b)
a type of graphics
c)
Data type
d)
a type of memory
2.
What symbol is used in python to assign values to a variable?
a)
equals =
b)
plus +
c)
forward slash /
d)
asterisk *
3.
What will be the output?
name = "Dave"
print (name)
a)
Dave
b)
'Dave'
c)
name
d)
(name)
4.
When you have an error in your code what is the term to summarise finding and fixing that error?
a)
Error checking
b)
Debugging
c)
Syntax finder
d)
Error finder
5.
A syntax error means your code has a 'grammar' mistake or you used symbols/operations incorrectly
a)
True
b)
False
6.
Which statement correctly assigns the string "Tanner" to the variable name?
a)
name = print( "Tanner")
b)
input("Tanner")
c)
name = "Tanner"
d)
name = input("Tanner")
7.
What does the term 'debug' mean?
a)
Identify errors and fix them.
b)
Making a calculation
c)
A set of instructions
d)
Looking at code
8.
What does the print function do in python?
a)
It's a variable.
b)
It can input data.
c)
It displays an output
d)
It loops the code.
9.
In the following code, "city" is an example of a what?
a)
List
b)
Loop
c)
Variable
d)
Array
10.
What is the output from the following code?
print ("hello world")
a)
Hello World
b)
hello world
c)
print hello world
11.
What is the Python built-in function used to display numbers and text on the screen?
a)print
b)
input
c)
output
d)
command
12.
The punctuation requirements for printing a string in Python are:
a)
( ) , ! and " "
b)
( ) and !
c)
( ) and " "
d)
" " and !
13.
What will be the output?
name = "Dave"
print ("name")
a)
Dave
b)
"Dave"
c)
name
d)
"name"
Reset
