Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

7. PYTHON FUNCTIONS -2

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

1. In Python, _____________ function is a function that is defined without a name.

a)

user-defined

b)

anonymous

c)

built-in

d)

recursion

2.

2. An anonymous function is also called a ______________ function.

a)

recursion

b)

built-in

c)

user-defined

d)

lambda

3.

3. _________________ of a variable refers to the part of the program, where it is accessible.

a)

score

b)

function

c)

Scope

d)

none of these

4.

4. A variable declared inside the function's body is known as a ________ variable.

a)

local

b)

global

c)

register

d)

function

5.

5. A variable, with ____________ scope, can be used anywhere in the program.

a)

local

b)

global

c)

extern

d)

register

6.

6. Without using the ____________ keyword we cannot modify the global variable inside the function

a)

int

b)

char

c)

local

d)

global

7.

7. _____________ function is mostly used for creating small and one-time anonymous functions.

a)

built-in

b)

user-defined

c)

Lambda

d)

global

8.

8. Lambda function can only access ______________ variables and variables in its parameter list.

a)

function

b)

local

c)

global

d)

register

9.

9._______________ functions are mainly used in combination with the functions like filter(), map() and reduce().

a)

user-defined

b)

built-in

c)

local

d)

Lambda 

10.

10. ___________ statement can contain expression which gets evaluated and the value is returned.

a)

return

b)

break

c)

continue

d)

pass