wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

python_quiz

Total questions: 15

Worksheet time: 14mins

Name
Class
Date
1.



(a)  

2.



(a)  

3.



(a)  

4.



(a)  

5.



(a)  

6.



(a)  

7.



(a)  

8.



(a)  

9.

Which keyword is used to define a function in Python?

a)

Function

b)

def

c)

fun

d)

define

10.



(a)  

11.

What is the purpose of the return statement in a function?

a)

Print output

b)

Stop loop

c)

Send value back to caller

d)

Call another function

12.
a)

return n * fact(n-1)

b)

def fact(n)

c)

if n == 0: return 1

d)

n * fact(n-1)

13.



(a)  

14.



(a)  

15.



(a)