wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python

Total questions: 21

Worksheet time: 11mins

Name
Class
Date
1.

What is python

a)

The hardest language in the world

b)

A type of block code

c)

A type of code designed for readibilty and starters

d)

JavaScript

2.

What is the print statement used for?

a)

To make a varible

b)

To write something on the shell

c)

To make a comment

d)

Do operations

3.

What does the input statment do?

a)

Make a brand new varible

b)

Write something on the shell

c)

Send a sos message

d)

Ask the user a question

4.

What can function do? (Please choose all the correct answers)

a)

To convert a python project to a JavaScript project.

b)

Use muitiple lines of code to replace on line of code

c)

Put together a series of code

d)

Have add arguments for example: doing a math equation

5.
Which of the following is a valid function call?
a)
forward()
b)
forward(
c)
forward)
d)
forward(;
6.

Code for Hello, World!

a)

print Hello, World!

b)

print("Hello, World!)

c)

print("Hello, World!")

7.

What type of loop can make a forever loop

a)

For loop

b)

While loop

c)

for each loop

d)

do...while lopp

8.

What does an if statment do?

a)

Add two varibles

b)

See if the condition is true or no

c)

Makes a forever loop

d)

Does the opposite of what you type

9.

If loops are used when

a)

When you want to activate a bomb

b)

You want a statment to activivate when the statment is true

c)

When you want the code to repeat

d)

When you want to clear the console

10.

What type of symbols are used for a list

a)

| |

b)

{ }

c)

[ ]

d)

\ \

11.

What are class the most simalar to

a)

A varible

b)

A function

c)

An if stament

d)

A string

12.

What does this equation mean =!

a)

The remainder of something

b)

Greater than

c)

Equal to

d)

Not equal to

13.

What type of code is used to split a string

a)

For loop

b)

Input statements

c)

While loop

d)

If else stament

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

is integer a number

a)

true

b)

false

17.

Can lists be a mix of string and intergers

a)

Yes

b)

No

18.

What does this symbol mean %

a)

Add a varible

b)

Muiltiply a varible

c)

The remainder of something

d)

The answer of a divsion equation

19.

If you want to create an empty list called colours in Python, which of the following is correct?

a)

colours = [ ]

b)

colours = ( )

c)

colours = { }

d)

colours = <>

20.
What letter will be printed on the screen after running this code:
a)

e

b)

a

c)

w

d)

Nothing prints

21.
What will the output be from the following code?
print(3+4)
a)
3+4
b)
7
c)
SyntaxError
d)
print(3+4)