wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Getting started with Python: Writing Code

Total questions: 20

Worksheet time: 5hrs 0mins

Name
Class
Date
1.

Python is one of the most popular and useful languages used to give instructions to computers.

a)

Continue

b)

.

2.
a)

continue

b)

.

3.
a)

print

b)

send

4.
a)

display

b)

print

5.
a)

( )

b)

(

c)

) (

d)

)

6.
a)

Both lines are printed.

b)

This will not run

c)

This will run

d)

Error because of the comment.

7.
a)

print (" ")

b)

print ( )

c)

print =

d)

print

8.
a)

print, "Order Shipped"

b)

print, Order Shipped

9.



(a)  

10.

Write full and complete code. No need space

(a)  

11.

Write full and complete code. No need space

(a)  

12.
a)

Order Ready

b)

"Order Ready"

13.

Write full and complete code. No need space

(a)  

14.

Which of the following lines is a valid comment in Python?

a)

<!-- This is a comment -->

b)

/* This is a comment */

c)

// This is a comment

d)

# This is a comment

15.
a)

An error

b)

print

c)

Level Up

d)

nothing / no message

16.

Write full and complete code. No need space

(a)  

17.

Write full and complete code. No need space

(a)  

18.

Write full and complete code. No need space

(a)  

19.

Write full and complete code. No need space

(a)  

20.
a)

to display the number 24 on screen

b)

to send the number 24 to the printer

c)

to delete the number 24