

MCQOPTIONS
Saved Bookmarks
This section includes 6 Mcqs, each offering curated multiple-choice questions to sharpen your Python knowledge and support exam preparation. Choose a topic below to get started.
1. |
Say s= hello what will be the return value of type(s)? |
A. | int |
B. | bool |
C. | str |
D. | String |
Answer» D. String | |
2. |
What will be displayed by print(ord( b ) ord( a ))? |
A. | 0 |
B. | 1 |
C. | -1 |
D. | 2 |
Answer» C. -1 | |
3. |
What will be the output of the hello +1+2+3? |
A. | hello123 |
B. | hello |
C. | Error |
D. | hello6 |
Answer» D. hello6 | |
4. |
The format function, when applied on a string returns ___________ |
A. | Error |
B. | int |
C. | bool |
D. | str |
Answer» E. | |
5. |
Suppose s is t tWorld n , what is s.strip()? |
A. | t tWorld n |
B. | t tWorld n |
C. | t tWORLD n |
D. | World |
Answer» E. | |
6. |
Which of the following statement prints hello example test.txt? |
A. | print( hello example test.txt ) |
B. | print( hello example test.txt ) |
C. | print( hello example test.txt ) |
D. | print( hello example test.txt ) |
Answer» C. print( hello example test.txt ) | |