MCQOPTIONS
Saved Bookmarks
This section includes 5 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. |
def fn(a): print(a)x=90fn(x)24.Which one of the following is incorrect? |
| A. | The variables used inside function are called local variables. |
| B. | The local variables of a particular function can be used inside other functions, but these cannot be used in global space |
| C. | The variables used outside function are called global variables |
| D. | In order to change the value of global variable inside function, keyword global is used. |
| E. | |
| Answer» C. The variables used outside function are called global variables | |
| 2. |
print(chr(ord(chr(97))))23.Choose the correct option with reference to below Python code? |
| A. | x is the formal argument. |
| B. | a is the actual argument. |
| C. | fn(x) is the function signature. |
| D. | x is the actual argument. |
| Answer» E. | |
| 3. |
z = lambda x : x * xprint(z(6))22.What is the output of the following program? |
| A. | a |
| B. | A |
| C. | 97 |
| D. | error |
| Answer» B. A | |
| 4. |
Lambda is a function in python? |
| A. | True |
| B. | False |
| C. | Lambda is a function in python but user can not use it. |
| D. | None of the above |
| Answer» B. False | |
| 5. |
Which operator is used in Python to import modules from packages? |
| A. | . |
| B. | * |
| C. | -> |
| D. | & |
| Answer» B. * | |