Class 12 Computer Science Python Functions – Working with Functions MCQs Set – 2

Python Functions – Working with Functions MCQ’s



Multiple Choice Questions [MCQs] Set – 2


21. ____________ are pre-defined functions and are always available for use.

a) Built-in Functions

b) Functions defined in module

c) User defined functions

d) All of these

Answer : a) Built-in Functions

22. ____________ are pre-defined functions in particular modules and can only be used when the corresponding module is imported.

a) Built-in Functions

b) Functions defined in module

c) User defined functions

d) All of these

Answer : b) Functions defined in module

23. ____________ are defined by programmer and user.

a) Built-in Functions

b) Functions defined in module

c) User defined functions

d) All of these

Answer : c) User defined functions

24. Once a function is defined, it can be invoked only one time.

a) True

b) False

Answer : b) False

25. Function in Python, always return a value.

a) True

b) False

Answer : a) True

26. Function header always ends with _____.

a) dot (.)

b) semicolon (;)

c) colon (:)

d) None of these

Answer : c) colon (:)

27. The first line of function definition that begins with keyword def and ends with a colon, specifies the ________ and ________.

a) function name, parameters

b) function name, body of function

c) body of function, parameters

d) None of these

Answer : a) function name, parameters

28. The function definition execute the function body.

a) True

b) False

Answer : b) False

29. The function calling another function is called the _______.

a) called

b) callee

c) caller

d) None of these

Answer : c) caller

30. Values are being passed to the function through _________.

a) function call

b) function definition

c) both (a) and (b)

d) None of these

Answer : a) function call

31. Values are received to the function through _________.

a) function call

b) function definition

c) both (a) and (b)

d) None of these

Answer : b) function defintion

32. The values being passed through a function-call statement are called ________.

a) arguments

b) actual parameters

c) both (a) and (b)

d) None of these

Answer : c) both (a) and (b)

33. The values received in the function definition are called _______.

a) parameters

b) formal arguments

c) both (a) and (b)

d) None of these

Answer : c) both (a) and (b)

34. Find the output :

def fun1(n):
    n = n + 10
    

num = 5
fun1(num)
print(num)

a) 15

b) 5

c) Error

d) None of these

Answer : b) 5

35. Find the output :

def fun1(n):
    n = n + 10
    print(n)
    

num = 5
fun1(num)

a) 15

b) 5

c) Error

d) None of these

Answer : a) 15

36. Find the output :

def fun1(n):

    n = n + 20
    print(id(n))
    

num = 5     #id of num is 252525
fun1(num)

a) 25

b) 252525

c) 5

d) None of these

Answer : b) 252525

37. Python supports ________ types of formal arguments (parameters).

a) 2

b) 3

c) 4

d) None of these

Answer : b) 3

38. Which of the following is not a valid type of argument in Python?

a) Positional Arguments/Parmeters

b) Default Arguments/Parameters

c) Keyword Arguments/Parameters

d) None of these

Answer : d) None of these

39. Which of the following argument type is known as the Named Argument in Python?

a) Positional Arguments/Parmeters

b) Default Arguments/Parameters

c) Keyword Arguments/Parameters

d) None of these

Answer : c) Keyword arguments/parameters

40. Which of the following argument type is known as the Required Argument in Python?

a) Positional Arguments/Parmeters

b) Default Arguments/Parameters

c) Keyword Arguments/Parameters

d) None of these

Answer : a) Positional Arguments/Parameters


Python Functions – Working with Functions (MCQ’s)



Python Revision Tour – Multiple Choice Questions (MCQ’s)



Python File Handling (MCQ’s)



Class 12 Computer Science NCERT Book Exercise Solutions


You cannot copy content of this page

Scroll to Top