NEW
Font size
WorksheetsPython Final Revision
Total questions: 25
Worksheet time: 12mins
Loops are a good way to repeat a sequence of code.
True
False
Turtle is a simple tool to draw images using Python.
True
False
To compare two values we use a double equals == symbol.
True
False
What would happen if the user answers “n”?
Ok bye gets printed
Nothing happens
Error
It would ask the question again
What is displayed by this code
Mynumber
0
1
I want to print a string. Which print block to use: A or B?
A
B
I want to print the value of a variable. Which print block do I use: A or B?
A
B
What will be printed?
0,1,2,3,4
1,2,3,4,5
i,i,i,i,i
What will be printed?
Hello World Once
Endless Hello World
Error
What will be printed?
Hello World Once
Endless Hello World
Nothing
What will be printed?
Hello World Once
Endless Hello World
Hello World 4 times
What will be printed?
0,1,2
dog, cat, hamster
dog, dog, dog
What will be printed?
0,1,2,3,4
5 different random numbers from 1 to 5
all 1s, all2s, all3s, all4s or all5s
What will be printed?
Endless dog, cat, hamster randomly
dog, cat, hamster randomly once
Endless 0, 1, 2 randomly
what does this do
Chose a random number
import a library called random
selecting a number between 1 and 13
selecting a number between 1 and 100
Which number could not be generated by this block
1
3
13
0
What datatype would userNumber be after this block is run
string
integer
real
a number if they enter a number
What will be displayed on the screen when
computerNumber = 10
and
userNumber = 10
10
SNAP
20
no snap
Which shape will this block make?
Triangle
Circle
Hexagon
Pentagon
What will be the output for given code?
5
7
2
6
Which of the following is NOT a comparison operator in C++ language?
>
<=
=
==
Which code would i use to add an item at the end to a list?
variable.add()
variable.append()
append.variable()
add.variable()
how can we pick the 3rd element from the list?
list[2]
list(2)
list(3)
list[3]
What will be the output of
5
4
4
4
5
5
4
5
nameList = ["John", "Harry", "Jesse", "John", "Marry", "Larry"]
The list will be slice and show Harry and Jesse only. Which piece of code below would do this?
print(nameList[1:3])
print(nameList[0:1])
print(nameList[1:2])
print(nameList["Harry":"Jesse"])
