WorksheetsLesson 27 – Concept of arguments
Total questions: 10
Worksheet time: 5mins
Which of the following enclose the input parameters or arguments of a function?
rackets
parenthesis
curly braces
quotation marks
What is the default return value for a function that does not return any value explicitely ?
int
float
string
none
Which of the following function definition does not return any value?
a function that prints integers from 1 to 100.
a function that returns a random integer from 1 to 100
a function that checks
whether the current second is an integer from 1 to 100.
a function that converts an uppercase letter to lowercase.
Which of the following statements correctly represent the function body in the given code snippet?
return “number”
print(number)
print(“number”)
return number
which statement is correct about the given program ?
HelloHelloHelloHelloHello
HelloHelloHelloHello
invalid call
infinite loop
What will be the output of following code ?
welcomeviewers
welcomeviewersviewersviewers
welcomeviewers,viewers,viewers
welcome
Which of the following function declaration is correct?
def f(a = 1, b):
def f(a = 1, b, c = 2):
def f(a = 1, b = 1, c = 2):
def f(a = 1, b = 1, c = 2, d):
what will be the output of the following code ?
a is 25 and b is 5 and c is 24.
a is none and b is 25 and c is 24.
none of the mentioned.
both (a) and (b) depending upon situation.
If return statement is not used inside the function, the function will return ?
0
null
arbitrary value
none
which function is used to find the maximum of a list ?
maximum()
max()
most()
mostly()
