Font size
S
M
L
XL
WorksheetsBasic Python Bug Squashing
Total questions: 11
Worksheet time: 6mins
Name
Class
Date
1.
Which is bug free?
a)
print(str(5+2))
b)
print(str(5+2)
c)
print(str5+2))
d)
print(5+"2")
2.
Fill in the gap: my_num = (a) (input("Enter number"))
3.
# What should go here?
print("Hello",name)
a)
names = input("Your name?")
b)
nama = "James"
c)
name = input("Your name?")
d)
James = name
4.
What will be output? print(14%12)
a)
7
b)
26
c)
2
d)
error
5.
What will be printed. print(20//3)
a)
6.666666666666667
b)
6
c)
7
d)
error
6.
What will be printed. print(20/3)
a)
6.666666666666667
b)
6
c)
7
d)
error
7.
print("20"//"3")
a)
6.666666666666667
b)
6
c)
7
d)
error
8.
Which of the following are valid Python variable names:
a)
home_address
b)
route66
c)
4square
d)
ver1.3
e)
Age
9.
a)
for in :
b)
For in :
10.
a)
if > ;
b)
if > :
11.
a)
if == : else:
b)
if == : else
Reset
