Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

7. PYTHON FUNCTIONS - 3

Total questions: 10

Worksheet time: 6mins

Name
Class
Date
1.

1. When a function calls itself is known as ______________ .

a)

lamda

b)

recursion

c)

local

d)

none of these

2.

2. ___________ function returns the ASCII value for the given Unicode character.

a)

abs()

b)

chr()

c)

ord()

d)

bin

3.

3. _____________ function returns the nearest integer to its input.

a)

format()

b)

round()

c)

integer()

d)

bin()

4.

4. ____________function returns the largest integer

less than or equal to x .

a)

ceil ( )

b)

sqrt ( )

c)

floor ( )

d)

pow()

5.

The value returned by a function may be used as an argument for another function in a nested manner is called ________________.

a)

expression

b)

nested

c)

composition

d)

a & b

6.

A _______________ function is called by some external code.

a)

built-in

b)

user-defined

c)

lambda

d)

recursive

7.

________ function returns an absolute value of a number.

a)

pow()

b)

int()

c)

floor()

d)

abs()

8.

What term is used to describe data passed into a function?

a)

Variable

b)

Loop

c)

Constant

d)

Parameter

9.

_________ function return the address of the object in memory.

a)

floor()

b)

pow()

c)

id( )

d)

ord()

10.

10. What is the output of the following code?

MyList = [21,76,98,23]

print ('Maximum of MyList :', max(MyList))

(a)