NEW
Font size
WorksheetsPython Knowledge Check
Total questions: 55
Worksheet time: 41mins
What will be the output?
name = "Dave"
print (name)
Dave
'Dave'
name
(name)
What is a folder?
the name given to a set of recorded information
the name given to the place where files that can be bought
the name given to the place where files that can be stolen
the name given to the place where files that can be stored
print(3*4+5)
A syntax error means your code has a 'grammar' mistake or you used symbols/operations incorrectly.
True
False
Python language was developed in what year?
1985
2001
1991
1820
Python uses indentation to block code into chunks
True
False
What datatype will the answer be if the user enters 15 and 30?
Integer
String
Boolean
Float
Which one will display when this code is run?
What will this code do?
Print Numbers 1-11
Print Numbers 1-10
Print Numbers 2-10
Print Error
Which of these is NOT a loop in python?
for loop
while loop
nested loop
if loop
Which of these operators means EQUAL TO?
'='
'=>'
'<='
'=='
What does the '#' allow you to do?
Repeat code
Comment on code
Print code
End code
If i want to continuously check for a correct answer, what loop would i use?
for loop
while loop
holds whole numbers
holds a decimal point in a number
What is the Python built-in function used to display numbers and text on the screen?
input
output
command
If you want to create an empty list called colours in Python, which of the following is correct?
colours = [ ]
colours = ( )
colours = { }
colours = <>
Each item in a list has an index. What is the first index in a Python list?
0
1
a
A
What will the output be from the following code?
print(3+4)
3+4
7
SyntaxError
print(3+4)
What will the output be from the following Python code?
Print("Hello world!")
NameError
Hello world!
"Hello world"
Print(Hello world!)
What will the output be from the following Python code?
print(9/3)
3
3.0
9/3
SyntaxError
What will the output be from the following Python code?
print(Hello world!)
Hello world!
SyntaxError
Hello world
print(Hello world!)
Which of these is correct Python conditional statement?
IF answer == "Yes":
if answer == "Yes"
if answer == "Yes":
if answer = "yes":
Which of these is correct Python conditional statement?
IF answer == "Yes":
if answer == "Yes"
if answer == "Yes":
if answer = "yes":
print("Hello world!" * 2)
