String in Python Quiz 12

Share with others

Welcome to your String in Python Quiz 12

Q111. Which of the following statement will return error?

Q112. print(ord("A")) will return _______________

Q113. Write the output of the following:

s="str"
for i in s:
     if i.islower():
           print(s.swapcase()

Q114. Write the output of the following:

s="str"
for i in range(len(s)):
s=s.upper()
print(s.upper() + str(s.islower()))

Q115. Select the wrong option in reference to the statement given below:

(operand1) * (operand2) = No error

Q116. print("a" in "amit") will return _______________

Q117. >>>chr(97) will return _____________

Q118. Write the output of the following:

>>> s = "i love my country"
>>> r = "i love my class"
>>> s[2:5] + s[-7:]

Q119. >>> max("my name is") will display ________________

Q120. "max"[: : -1].startswith("x") will display _____________


Share with others

Leave a Reply