Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python (printing)

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

When you open the Python interface you first see the​ (a)  

There are 3 arrows that are a prompt for you to enter​ (b)  

The command you type in is performed when you​ (c)  

Choose from the below words
interactive shell
a single command
multiple commands
press enter
click on Run
interactional screen
2.

In Python, the command to make text appear on the screen is...

a)

print

b)

PRINT

c)

output

d)

display

3.

When you finish typing the word print into the shell, the word changes colour - what colour does it become?

a)

blue

b)

red

c)

green

d)

purple

4.

Which of these commands would produce an error message?

a)

print("Hello")

b)

print('Hello')

c)

print(Hello)

5.

Which of these commands would produce an error message?

a)

print("Hello")

b)

print('Hello')

c)

print"Hello"

6.

What would be the result of entering the command below?

PRINT("Hello")

a)

Error message

b)

Hello is printed

c)

Nothing, it will wait for more commands

7.

What would be the result of entering the command below?

print("That's right!")

a)

Error message

b)

That's right! is printed

c)

Nothing, it will wait for more commands

8.

What would be the result of entering the command below?

PRINT('That's right!')

a)

Error message

b)

That's right! is printed

c)

Nothing, it will wait for more commands

9.

What would be the result of entering the command below?

print(2*"Hello")

a)

Error message

b)

Hello

Hello

c)

HelloHello

10.

What command would produce the output shown below?

Hello

Hello

a)

print(2*"Hello\n")

b)

print(2*"Hello"\n)

c)

print("Hello\n")*2

d)

print(2*"Hello/n")