Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Debugging

Total questions: 5

Worksheet time: 3mins

Name
Class
Date
1.

Fix the error to define a list

num_list={1,2,3,5}

a)

num_list="{1,2,3,5}"

b)

num_list=[1,2,3,5]

c)

num_list=[1-2-3-5]

d)

num_list=(1,2,3,5)

2.

Correct the error in the following string definition

my_string='Hello World!

a)

my_string='Hello World!'

b)

my_string="Hello World!

c)

my_string="Hello World!"

d)

my_string='Hello World!

3.

fix the error in if statement

if x>10

print("Pass")

a)

if (x>10)

print("Pass")

b)

if x>10

print "Pass"

c)

if x>10:

print("Pass")

d)

if x>10 then

print("Pass")

4.

There is something wrong with the syntax of the program

a)

Logical Error

b)

Syntax Error

c)

Program Error

5.

Errors that occur during the runtime are called:

a)

Program Error

b)

Syntax Error

c)

Logical Error