1. What will be the output of the following Python code snippet?
print('for'.isidentifier())
a) true
b) false
c) none
d) error
Explanation: Even keywords are considered as valid identifiers.
2. What will be the output of the following Python code snippet?
print('abc'.islower())
a) true
b) false
c) none
d) Error
Explanation: There are no uppercase letters.
3. What will be the output of the following Python code snippet?
print('a@ 1,'.islower())
a) true
b) false
c) none
d) error
Explanation: There are no uppercase letters.
4. What will be the output of the following Python code snippet?
print('11'.isnumeric())
a) true
b) false
c) none
d) error
Explanation: All the character are numeric.
5. What will be the output of the following Python code snippet?
print('1.1'.isnumeric())
a) true
b) false
c) none
d) error
Explanation: The character . is not a numeric character.
6. What will be the output of the following Python code snippet?
print('1@ a'.isprintable())
a) true
b) false
c) none
d) Error
Explanation: All those characters are printable.
7. What will be the output of the following Python code snippet?
print(''''''.isspace())
a) true
b) false
c) none
d) Error
Explanation: None.
8. What will be the output of the following Python code snippet?
print('\t'.isspace())
a) true
b) false
c) none
d) Error
Explanation: Tab Spaces are considered as spaces.
9. What will be the output of the following Python code snippet?
print('HelloWorld'.istitle())
a) true
b) false
c) none
d) Error
Explanation: The letter W is uppercased.
10. What will be the output of the following Python code snippet?
print('Hello World'.istitle())
a) true
b) false
c) none
d) Error
Explanation: It is in title form.