wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Lesson 26 – Types of functions

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

Which of the following is correct ?

a)

the function of type 3 will never return any value.

b)

sum() function returns a string value.

c)

function will allocated memory only when it is called.

d)

all are correct

2.

What is the output of the following code?

a)

24

b)

4

c)

44

d)

2

3.

Which of the following is correct ?

a)

every function can be called in from any function.

b)

function can be called outside of function.

c)

none of (a) and (b) is correct.

d)

both (a) and (b) is correct.

4.

which keyword is used to return any value from the function ?

a)

send

b)

return

c)

goto

d)

Return

5.

which statement is correct about the given program ?

a)

it will print “notchup” on the screen.

b)

it will raise an error.

c)

nothing will be printed.

d)

none

6.

What will be the output of following code ?

a)

4

b)

{2,1,3,5}

c)

[1,2,3,5]

d)

none

7.

Which keyword is used to define a function?

a)

for

b)

fun

c)

def

d)

no keyword is required

8.

with which operator ‘in’ keyword is used ?

a)

identity

b)

membership

c)

arithmetic

d)

none of these

9.

which function will not return any value ?

a)

len()

b)

sum()

c)

count()

d)

startswith()

10.

which function is used to display the content into screen?

a)

printf()

b)

print()

c)

printtext()

d)

none