wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Lesson 27 – Concept of arguments

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

Which of the following enclose the input parameters or arguments of a function?

a)

rackets

b)

parenthesis

c)

curly braces

d)

quotation marks

2.

What is the default return value for a function that does not return any value explicitely ?

a)

int

b)

float

c)

string

d)

none

3.

Which of the following function definition does not return any value?

a)

a function that prints integers from 1 to 100.

b)

a function that returns a random integer from 1 to 100

c)

a function that checks

whether the current second is an integer from 1 to 100.

d)

a function that converts an uppercase letter to lowercase.

4.

Which of the following statements correctly represent the function body in the given code snippet?

a)

return “number”

b)

print(number)

c)

print(“number”)

d)

return number

5.

which statement is correct about the given program ?

a)

HelloHelloHelloHelloHello

b)

HelloHelloHelloHello

c)

invalid call

d)

infinite loop

6.

What will be the output of following code ?

a)

welcomeviewers

b)

welcomeviewersviewersviewers

c)

welcomeviewers,viewers,viewers

d)

welcome

7.

Which of the following function declaration is correct?

a)

def f(a = 1, b):

b)

def f(a = 1, b, c = 2):

c)

def f(a = 1, b = 1, c = 2):

d)

def f(a = 1, b = 1, c = 2, d):

8.

what will be the output of the following code ?

a)

a is 25 and b is 5 and c is 24.

b)

a is none and b is 25 and c is 24.

c)

none of the mentioned.

d)

both (a) and (b) depending upon situation.

9.

If return statement is not used inside the function, the function will return ?

a)

0

b)

null

c)

arbitrary value

d)

none

10.

which function is used to find the maximum of a list ?

a)

maximum()

b)

max()

c)

most()

d)

mostly()