Python Functions – Working with Functions MCQ’s
Multiple Choice Questions [MCQs] Set – 1
1. The process of dividing a computer program into separate independent blocks of code or separate sub-problems with different names and specific functionalities is known as _______________.
a) modular programming
b) structural programming
c) object-oriented programming
d) parallel programming
2. In programming, the use of function is one of the means to achieve _________.
a) modularity
b) reusability
c) Both (a) and (b)
d) None of these
3. __________ can be defined as a named group of instructions that accomplish a specific task when it is invoked.
a) Function
b) Program
c) Both (a) and (b)
d) None of these
4. Once a Function is defined, you can call it ___________.
a) several times
b) only one time.
c) zero time.
d) None of these
5. The programmer can define ___________
function(s) while writing the code.
a) only one
b) many
c) zero.
d) None of these
6. The programmer can define ___________ function(s) while writing the code.
a) only one
b) many
c) zero.
d) None of these
7. Which of the following are advantages of Functions?
a) increase readability & reusability
b) reduces code length
c) work can be easily divided and completed in parallel.
d) All of these
8. A __________ is a subprogram that acts on data and often returns a value.
a) program
b) function
c) software
d) All of these
9. You can create a function in a program, that _______
a) can have arguments, if needed
b) can perform certain functionality
c) can return a result
d) All of these
10. In Python, Function definition is start with ___________
a) module
b) sub
c) def
d) All of these
11. In Python, ______ keyword is use to define a function.
a) module
b) sub
c) def
d) All of these
12. The statements indented below the function i.e. below def line, is called _______.
a) components
b) body of function
c) compound statements
d) All of these
13. In Python, the body of function is define __________.
a) the purpose of the functioin
b) the working of the function
c) the functionality of the function
d) All of these
14. In Python, ______ is used to returns the computed results.
a) return
b) back
c) end
d) All of these
15. def compoundInterest (p, q, r):
In the above statement, what is the compoundInterest ?
a) Function name
b) Function Purpose
c) Program Name
d) None of these
16. def compoundInterest (p, q, r):
In the above statement, what is the p, q, r ?
a) Variable of program
b) Argument to the function
c) Keyword
d) None of these
17. To use a function that has been defined earlier, you need to write a ________ statement in Python.
a) function call
b) return
c) program name
d) None of these
18. Identify which of the following is a valid function call statement?
a) function_name( )
b) function_name(5, 6)
c) function_name(x, y, z)
d) All of these
19. In Python, functions are _______ types?
a) 2
b) 3
c) 4
d) None of these
20. In Python, Which of the valid types of Functions?
a) Built-in Functions
b) Functions defined in module
c) User defined functions
d) All 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