Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

PYTHON: Correct The Code

Total questions: 32

Worksheet time: 16mins

Name
Class
Date
1.
a)

b)

c)

d)

No errors.

2.
a)

b)

c)

d)

No errors.

3.
a)

b)

c)

d)

No errors.

4.

Type in the correct code.

(a)  

5.
a)

b)

c)

d)

No errors.

6.
a)

b)

c)

d)

No errors.

7.
a)

b)

c)

d)

No errors.

8.
a)

b)

c)

9.
a)

b)

c)

d)

No error.

10.
a)

b)

c)

d)

No errors.

11.
a)

A

b)

B

c)

C

d)

No errors.

12.
a)

b)

c)

d)

No errors.

13.

Hint: colors = [0, 1, 2]

a)

b)

c)

d)

No errors.

14.
a)

b)

c)

d)

No errors.

15.

Hint: Look at 'y_predict' and the order of the code.

a)

b)

c)

No errors.

16.
a)

b)

c)

No errors.

17.
a)

b)

c)

d)

No errors.

18.
a)

b)

c)

d)

No errors.

19.

There are multiple errors in this code!

a)

b)

c)

d)

No errors.

20.

Hint: Look at the spelling and check for commas!

a)

b)

c)

d)

No errors.

21.

TRUE OR FALSE?

There are no errors in this code.

a)
True
b)
False
22.

TRUE OR FALSE?

This code has errors.

a)
True
b)
False
23.
a)

b)

c)

No errors.

24.

Hint: Look closely at the 'result =' line

a)

b)

c)

No errors.

25.

Hint: Parentheses!

a)

A

b)

B

c)

No errors.

26.
a)

A

b)

B

c)

C

d)

No errors.

27.

TRUE OR FALSE?

There are no errors in this code.

a)
True
b)
False
28.

The code contains no errors.

a)
True
b)
False
29.
a)

b)

c)

d)

No errors.

30.

Fill in the blank.

All lowercase.

(a)  

31.

Fill in the blank.

All lowercase.
Hint: Starts with the letter 'h'

(a)  

32.

Type the correct code!

(a)