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
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
23. ____________ are defined by programmer and user.
a) Built-in Functions
b) Functions defined in module
c) User defined functions
d) All of these
24. Once a function is defined, it can be invoked only one time.
a) True
b) False
25. Function in Python, always return a value.
a) True
b) False
26. Function header always ends with _____.
a) dot (.)
b) semicolon (;)
c) colon (:)
d) None of these
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
28. The function definition execute the function body.
a) True
b) False
29. The function calling another function is called the _______.
a) called
b) callee
c) caller
d) None of these
30. Values are being passed to the function through _________.
a) function call
b) function definition
c) both (a) and (b)
d) None of these
31. Values are received to the function through _________.
a) function call
b) function definition
c) both (a) and (b)
d) None of these
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
33. The values received in the function definition are called _______.
a) parameters
b) formal arguments
c) both (a) and (b)
d) None of these
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
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
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
37. Python supports ________ types of formal arguments (parameters).
a) 2
b) 3
c) 4
d) None of these
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
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
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
Python Functions – Working with Functions (MCQ’s)
- Class 12 Computer Science Python Functions – Working with Functions MCQs Set – 1
- Class 12 Computer Science Python Functions – Working with Functions MCQs Set – 2
- Class 12 Computer Science Python Functions – Working with Functions MCQs Set – 3
- Class 12 Computer Science Python Functions – Working with Functions MCQs Set – 4
- Class 12 Computer Science Python Functions – Working with Functions MCQs Set – 5
- Class 12 Computer Science Python Functions – Working with Functions MCQs Set – 6
Python Revision Tour – Multiple Choice Questions (MCQ’s)
- Class 12 Computer Science MCQs Python Revision Tour Set – 1
- Class 12 Computer Science MCQs Python Revision Tour Set – 2
Python File Handling (MCQ’s)
- Class 12 Computer Science File Handling in Python MCQs Set 1
- Class 12 Computer Science File Handling in Python MCQs Set 2
- Class 12 Computer Science File Handling in Python MCQs Set 3
- Class 12 Computer Science File Handling in Python MCQs Set 4
- Class 12 Computer Science File Handling in Python MCQs Set 5
- Class 12 Computer Science File Handling in Python MCQs Set 6
- Class 12 Computer Science File Handling in Python MCQs Set 7
- Class 12 Computer Science File Handling in Python MCQs Set 8
- Class 12 Computer Science File Handling in Python MCQs Set 9
Class 12 Computer Science NCERT Book Exercise Solutions
- Interface Python with MySQL – Important Questions – Answer
- Class 12 Computer Science – Exception Handling in Python NCERT Exercise Solutions
- Class 12 Computer Science File Handling in Python NCERT Exercise solution
- Class 12 Computer Science Stacks NCERT Exercise Solution
- Class 12 Computer Science Queues NCERT Exercise Solution