Font size
WorksheetsPython Year 7 Assessment
Total questions: 55
Worksheet time: 29mins
Which of the following would allow the user to enter data?
elif
output
input
Which code would display 'Hello World'
Print("Hello World")
print("Hello World")
print(Hello World)
print=("hello world")
If you type 10/5 what result would you get in python?
2
2.0
0
15
If you type 6//2 what result would you get in python.
3.0
4
3
0
What is a variable?
A named memory location
a value
a number
a letter
Which of the following is NOT a suitable variable name?
num1
Num1
MyName
My name
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
print("Hello world!")
print(3+4)
What would this print?
print("3+4")
Print("Hello world!")
print("Hello" + "world" + "today")
print(Hello world!)
print("Hello world!\nHello world!")
Hello world!
print("Hello world!" * 2)
print(9/3)
What is an Algorithm?
Developing a step by step solution to a problem.
Breaking a complex problem into smaller parts.
Focusing on the important information only.
Looking for similarities within problems.
What program is used to type your code?
Snake
Python
Cobra
Worm
What is this known as 00111000
Denary
Binary
Tertiary
Primary
name = "Bob"
if name == "Bob":
print ("Hello " + name)
else:
print ("I dont know you")
name = 'Dave'
greeting = "Good morning" + name
print (greeting)
name = 'Dave'
print (name)
32,36,40,44
Code is...
when it's not warm.
the dog from Garfield.
a song or poem dedicated to someone.
specific instructions in a computer program.
What do we call the person who writes the instructions for the computer to complete a task?
architect
coder
Bob
composer
A good code/program must be
Detailed and short
Hard to understand
Very long
Which of these is suitable for a variable name
x = '4hello'
x = 'hello there'
x = 'hello'
x = hello there
which of the statements below will print properly?
x = 6
y = "I am"
print (y , x)
print ((int(y) , x)
print (y, (str(x))
print (y , (int(x))
Which line in this program is incorrect?
if 6 > 8:
print ("Correct")
else
print ("Incorrect")
Line 1
Line 2
Line 3
Line 4
Which line in this program is incorrect?
if 9 > 8:
Print ("Correct")
else:
print ("Incorrect")
Line 1
Line 2
Line 3
Line 4
What is the keyword needed to repeat code (iterate) in Python?
for
if
input
In order to move the turtle 120 forward without drawing on the screen, which order is correct?
forward(120)
penup()
pendown()
pendown()
forward(120)
penup()
penup()
forward(120)
pendown()
Look at this code, how many times will it loop?
50
90
0
4
Look at this code, which of these is a variable?
input
4
int
mylength
What is wrong with this code?
Missing Brackets
Missing Comma
Missing Colon
Incorrect spelling
What is wrong with this code?
Missing Brackets
Missing Comma
Missing Colon
Incorrect spelling
