Question 1 of 25
Hints left: 3
Q1
What will be the output of the following Python code snippet? print('abcd'.translate('a'.maketrans('abc', 'bcd')))
Q2
What will be the output of the following Python code? print("abcdef".center(0))
Q3
What will be the output of the following Python statement? >>>chr(ord('A'))
Q4
What will be the output of the following Python code snippet? print('1.1'.isnumeric())
Q5
What will be the output of the following Python code snippet? print(''.isdigit())
Q6
What will be the output of the following Python code? print('*', "abcdef".center(7), '*')
Q7
What will be the output of the following Python code snippet? print('+99'.zfill(5))
Q8
What will be the output of the following Python code? print("Hello {name1} and {name2}".format('foo', 'bin'))
Q9
What will be the output of the following Python code? print("abcdef".center(7, '1'))
Q10
What will be the output of the following Python code snippet? print('abcdefcdghcd'.split('cd', 0))
Q11
The output of executing string.ascii_letters can also be achieved by:
Q12
What will be the output of the following Python code? print("ab\tcd\tef".expandtabs('+'))
Q13
What will be the output of the following Python code? print('ab'.isalpha())
Q14
What will be the output of the following Python code snippet? print('{:,}'.format(1112223334))
Q15
What will be the output of the following Python code? print('{0:.2%}'.format(1/3))
Q16
What arithmetic operators cannot be used with strings?
Q17
What will be the output of the following Python code snippet? print('0xa'.isdigit())
Q18
What will be the output of the following Python statement? >>>"abcd"[2:]
Q19
What will be the output of the following Python code? print("Hello {} and {}".format('foo', 'bin'))
Q20
What will be the output of the following Python code? print('a'.maketrans('ABC', '123'))
Q21
What will be the output of the following Python code snippet? print('abcdefcdghcd'.split('cd'))
-
A
-
B
-
C
-
D
Q22
What will be the output of the following Python code snippet? print('1@ a'.isprintable())
Q23
What will be the output of the following Python code? print("xyyzxyzxzxyy".endswith("xyy", 0, 2))
Q24
What will be the output of the following Python code? print('1Rn@'.lower())
Q25
Suppose i is 5 and j is 4, i + j is same as . . . . . . . .