Functions Quiz 4

Share with others

Welcome to your Functions Quiz 4

Name
Email
School Name
Q31. Which of the following is not the scope of variable?

Q32. A variable that is defined inside any function or a block is known as a ________________

Q33. Fill in the blank so that the output is 9

a = 9
def sound():
  ________ a
  print(a)
sound()

Q34. Write the output of the following:

a = 9
def sound():
   b = 7
   print(a)
sound()
print(b)

Q35. How many built-in functions are used in the following code:

a = int(input("Enter a number: ")
b = a * a
print(" The square of ",a ,"is", b)

Q36. Which of the following is not the built-in function?

Q37. Which of the following is not the type of function argument?

Q38. Write the output of the following:

print("A")
def prnt():
      print("B")
print("C")
prnt()

Q39. Write the output of the following:

def check():
   i = 5
   while i > 1:
         if i //2==0:
              x = i + 2
              i = i-1
        else:
             i = i-2
             x = i
   print (x)
check()

Q40. Which module is to be imported for using randint( ) function?


Share with others

Leave a Reply