wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Python

Total questions: 16

Worksheet time: 8mins

Name
Class
Date
1.
What is the word (command) used to display numbers and text on the screen?
a)

print

b)

input

c)

output

d)

command

2.
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
3.
What symbol is used in python to assign values to a variable?
a)
equals =
b)
plus + 
c)
forward slash /
d)
asterisk *
4.

What will be the output?

name = "Dave"

print (name)

a)

Dave

b)

'Dave'

c)

name

d)

(name)

5.
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
6.
A syntax error means your code has a 'grammar' mistake or you used symbols/operations incorrectly
a)
True
b)
False
7.
What is Python?
a)
text based programming language
b)
word processor 
c)
spreadsheet
d)
block based programming language
8.
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")
9.

Python is a

a)

text language

b)

database language

c)

programming language

10.

Code for Hello, World!

a)

print Hello, World!

b)

print("Hello, World!)

c)

print("Hello, World!")

11.

Code for

257

Hello, World!

a)

x = 257

y = "Hello, World!"


print(y)

print(x)

b)

x = 257

y = "Hello, World!"


print(x)

print(y)

c)

x = 257

y = Hello, World!


print x

print y

12.

Insert the missing part of the code below to output

_________________ "My name is ".

a)

Print

b)

PRINT

c)

print

13.

Code for

b is greater than a

a)

a = 33

b = 200


if b > a:

print("b is greater than a")

b)

a = 33

b = 200


if b < a:

print("b is greater than a")

c)

a = 330

b = 200


if b > a:

print("b is greater than a")

14.

Python language use

a)

upper case letters

b)

lower case letters

c)

upper and lower case letters

15.

The output of the program

x = 4

x = "Sally"

print(x)

a)

four

b)

Saly

c)

Sally

16.
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