wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Python - Week 1 and 2 recap

Total questions: 9

Worksheet time: 4mins

Name
Class
Date
1.

Python is an example of a:

a)

Text-based programming language

b)

Visual-based programming language

c)

Block-based programming language

d)

Language written in JavaScript

2.

What will the output be from the following code? Print (“Hello world!”)

a)

SyntaxError

b)

“Hello world!”

c)

Hello world!

d)

Print (Hello world!)

3.

What is the syntax error with this code:

print(“Hello World”);

a)

No brackets around "Hello World"

b)

Speech marks are not needed

c)

Colon is not needed

d)

print is spelt incorrectly

e)

Print has a capital P

4.
Stores a piece of data, and gives it a specific name
a)
variable
b)
whitespace
c)
interpreter
d)
modulus
5.

The correct way to write a variable in python?

a)

my_variables=10

b)

my_variable:10

c)

my variable=10

d)

my_variable is 10

6.

If x1=9. What type is 'x'?

a)

int

b)

float

7.

I set the variable 'pi' to equal 3.1415926535. What type is it?

a)

int

b)

float

8.

integer=45.5

print(type(integer))

a)

<class 'int'>

b)

<class 'float'>

c)

45.5

d)

45

9.

Which statement correctly assigns "Sophie" to the variable name?

a)

name = print( "Sophie")

b)

input("Sophie")

c)

name = "Sophie"

d)

name = input("Sophie")