Functions Quiz 3

Share with others

Welcome to your Functions Quiz 3

Q21. Write the output of the following:

def fn(n1, n2=7):

     n1=n1+n2

     print(n1)

fn(3, 9)

Q22. Write the output of the following:

def fn(n1, n2=7):
   n1=n1%n2
   print(n1)
fn(3%2, 9%2)

Q23. Which of the following function definition header is wrong?

Q24. Functions which do not return any value is called __________________

Q25. The __________ statement returns the values from the function to the calling function.

Q26. The return statement in function is used to __________________

Q27. Choose the correct statement

Q28. Write the output of the following:

sound()
def sound():
   print("sound" * 2)

Q29. A function may return multiple values using _________________

Q30. The part of the program where a variable is accessible is known as the _____________ of that variable


Share with others

Leave a Reply

error: Content is protected !!