Font size
WorksheetsPython Quiz
Total questions: 50
Worksheet time: 25mins
Which of the following is used in Python to calculate ten squared?
print(Hello world!)
print(3+4)
print("3+4")
print("Hello" + "world!")
France
Wales
Wales
France
Ireland
'London', 'Exeter', 'Bristol']
'Bristol', 'Exeter', 'London', ]
Why do we learn Python?
It's a really big snake
It's the name of a very funny comedy show
It's simple and easy to learn
It's so rare that no one else knows it
What would this print?
What is the name of the Windows environment in Python that lets you write your programs and then test them out?
Shell
Window
IDLE
CLI
name = 'Dave'
print (name)
hobby = "football"
print("3*4+5")
4
3
2
1
3
2
1
0
print("Hello world!\nHello world!")
Hello world!
people = ["John", "Rob", "Bob"]
print (people[1])
what would this result be?
Select all examples of iteration
FOR loop
WHILE loop
START loop
REPEAT loop
What is the process of identifying and fixing errors in your code?
Rebugging
Syntax Solving
Debugging
Abstraction
What can be used to create a line break in printed text?
\N
\\n
/n
\n
The code that loops must be ____________________________
in parenthesis
in brackets
in a circle
indented
What is the output of the code below?
x = 5
if x == 0:
print("x is 0")
elif x > 1:
print("x is greater than 1")
elif x > 3:
print("x is greater than 3")
x is 0
x is greater than 1
x is greater than 3
What is called when a function is defined inside a class?
Module
Class
Another Function
Method
