MCQOPTIONS
Saved Bookmarks
This section includes 12 Mcqs, each offering curated multiple-choice questions to sharpen your Technical MCQs knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
___________ are the arguments passed to a function in correct positional order. |
| A. | Required arguments |
| B. | Keyword arguments |
| C. | Default arguments |
| D. | Variable-length arguments |
| E. | |
| Answer» B. Keyword arguments | |
| 2. |
A return statement with _____ arguments. |
| A. | No |
| B. | 1 |
| C. | 2 |
| D. | Any |
| Answer» B. 1 | |
| 3. |
The code block within every function starts with a ? |
| A. | ; |
| B. | :: |
| C. | : |
| D. | % |
| Answer» D. % | |
| 4. |
Function blocks begin with the keyword? |
| A. | define |
| B. | fun |
| C. | function |
| D. | def |
| Answer» E. | |
| 5. |
You can also create your own functions, these functions are called? |
| A. | built-in functions |
| B. | user-defined functions |
| C. | py function |
| D. | None of the above |
| Answer» C. py function | |
| 6. |
Which one of the following is the correct way of calling a function? |
| A. | function_name() |
| B. | call function_name() |
| C. | ret function_name() |
| D. | function function_name() |
| Answer» B. call function_name() | |
| 7. |
How is a function declared in Python? |
| A. | def function function_name(): |
| B. | declare function function_name(): |
| C. | def function_name(): |
| D. | declare function_name(): |
| Answer» D. declare function_name(): | |
| 8. |
In which part of memory does the system stores the parameter and local variables of funtion call? |
| A. | heap |
| B. | stack |
| C. | Uninitialized data segment |
| D. | None of the above |
| Answer» C. Uninitialized data segment | |
| 9. |
Which of the following function headers is correct? |
| A. | def fun(a = 2, b = 3, c) |
| B. | def fun(a = 2, b, c = 3) |
| C. | def fun(a, b = 2, c = 3) |
| D. | def fun(a, b, c = 3, d) |
| Answer» D. def fun(a, b, c = 3, d) | |
| 10. |
What is a recursive function? |
| A. | A function that calls other function. |
| B. | A function which calls itself. |
| C. | Both A and B |
| D. | None of the above |
| Answer» C. Both A and B | |
| 11. |
If return statement is not used inside the function, the function will return: |
| A. | None |
| B. | 0 |
| C. | Null |
| D. | Arbitary value |
| Answer» B. 0 | |
| 12. |
Which of the following items are present in the function header? |
| A. | function name |
| B. | parameter list |
| C. | return value |
| D. | Both A and B |
| Answer» E. | |