wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

1 Python Quiz

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What function would I use to display text?

a)

sum

b)

print

c)

import

d)

function

2.

What would I use to display a string of text?

a)

/// ///

b)

“” ,,,

c)

*** ***

d)

‘‘‘ ’’’

3.

What is the correct name for a *?

a)

asterisk

b)

hashtag

c)

loop

d)

star

4.

Where do you edit your code?

a)

console

b)

interrupter

c)

compiler

d)

editor

5.

What is missing from this program – print(hello)?

a)

‘‘ ’’

b)

::

c)

??

d)

*** ***

6.

Work out the errors for each number below.

Which number below will work?

a)

1

b)

2

c)

3

d)

4

7.

What code would produce something like this?

hellohellohellohellohello

a)

print("Hello" * 5)

b)

print(Hello * 4)

c)

print("hello" * 5)

d)

print("Hello * 5

8.

Why will this program NOT work?


print("hello" - 7)

a)

There is no quotation marks

b)

You cannot subtract a number (INT) from a string of text (STR)

c)

The print function is wrong

d)

"hello" is not a string of text

9.

What will this program print?


print("@" + "£")

a)

£

b)

@@@@££££

c)

d)

@

10.

What will this program print to the screen?

a)

Hello Fred

b)

Hello name

c)

What's your name?

d)

Hello then the answer to "What's your name?"