MCQOPTIONS
Saved Bookmarks
This section includes 7 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. |
Which of the following function is used to know the data type of a variable in Python? |
| A. | datatype() |
| B. | typeof() |
| C. | type() |
| D. | vartype() |
| E. | |
| Answer» D. vartype() | |
| 2. |
Which one of the following is False regarding data types in Python? |
| A. | In python, explicit data type conversion is possible |
| B. | Mutable data types are those that can be changed. |
| C. | Immutable data types are those that cannot be changed. |
| D. | None of the above |
| Answer» E. | |
| 3. |
What is the output of following: set([1,1,2,3,4,2,3,4]) |
| A. | [1,1,2,3,4,2,3,4] |
| B. | {1,2,3,4} |
| C. | {1,1,2,3,4,2,3,4} |
| D. | Invalid Syntax |
| Answer» C. {1,1,2,3,4,2,3,4} | |
| 4. |
Which of the following data type is used to store values in Key & Value format? |
| A. | List |
| B. | Tuple |
| C. | Dictionary |
| D. | Set |
| Answer» D. Set | |
| 5. |
Which of the follwing are the keys in the given statement : abc = {"first":10, "second":20} |
| A. | 10, 20 |
| B. | first, second |
| C. | first, 10, second, 20 |
| D. | first, 20 |
| Answer» C. first, 10, second, 20 | |
| 6. |
Which of the following is incorrect about dictionary keys? |
| A. | More than one key isn't allowed |
| B. | When duplicate keys encountered, the last assignment wins |
| C. | Keys must be immutable |
| D. | Keys must be integers |
| Answer» E. | |
| 7. |
arr = [1,2,3,4,5,6] print(a[::2])12.Which of these is not a core data type? |
| A. | List |
| B. | Tuple |
| C. | Dictionary |
| D. | Class |
| Answer» E. | |