wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Python Revision P1

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

What is the output of this line?

print("12*3")

a)

121212

b)

15

c)

36

d)

12*3

2.

What would the data type be for this number?

8,405,334

a)

integer

b)

float

c)

boolean

d)

string

3.

Why won't this work?

x = int(input("Enter a Number"))

print(X)

a)

Brackets are in the wrong place

b)

both x variables should be lower case

c)

It should have two equals

d)

Print should have a capital P

4.

Why is it important that was use comments in our code?

a)

To help other people understand what is going on in our code

b)

They help the program run smoothly

c)

To add more colours into our code

d)

So that when we come back to the code we can understand what it is doing

5.

What do we use to store a piece of data?

a)

keyword

b)

constant

c)

data

d)

variable

6.

What characters are used to check if two values are the same?

a)

!=

b)

==

c)

equals

d)

=

7.

What variable is using a string to store data?

a)

area

b)

length

c)

user_input

d)

perimeter

8.

Where does a function go in the program?

a)

bottom

b)

top

c)

middle

d)

at the end

9.

What MMC school value is caring for others?

a)

Manaaki

b)

Ngākau Tapatahi

c)

Aroha

d)

Ako

10.

What symbol do you use to make a comment in Python?

a)

!--

b)

@comment

c)

#

d)

==

11.

What will be the output?
name = 'Dave'
print (name)

a)

name

b)

Dave

c)

dave

d)

nothing

12.

What data type is used for a decimal number?

a)

float

b)

int

c)

boolean

d)

string

13.

What is the Python code needed to ask a user for input?

a)

name == input("what is your name?")

b)

name =
(input)=what is your name?

c)

name = input("what is your name?")

d)

name = input=what is your name?

14.

What day is Rāpare?

a)

Monday

b)

Friday

c)

Thursday

d)

Sunday

15.

If keep_going equals 5 what will happen?

a)

Syntax error

b)

Choose a shape.... etc will appear

c)

The program will keep going

d)

The program has ended will display