ExamVeda
Login
Home
91
What will be the output of the following Python code?
print('a B'.isalpha())
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
92
What function do you use to read a string?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
93
What will be the output of the following Python code snippet?
print('abcdef12'.replace('cd', '12'))
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
94
What will be the output of the following Python code snippet?
print('abcdefcdghcd'.split('cd', 2))
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
95
What will be the output of the following Python code snippet?
print('Ab!2'.swapcase())
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
96
What will be the output of the following Python code?
print("abcdef".center(7, 1))
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
97
What will be the output of the following Python code?
class Name:
    def __init__(self, firstName, mi, lastName):
        self.firstName = firstName
        self.mi = mi
        self.lastName = lastName
 
firstName = "John"
name = Name(firstName, 'F', "Smith")
firstName = "Peter"
name.lastName = "Pan"
print(name.firstName, name.lastName)
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
98
What will be displayed by print(ord('b') - ord('a'))?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
99
What will be the output of the following Python code?
print("xyyzxyzxzxyy".endswith("xyy"))
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
100
What will be the output of the following Python code snippet?
print('The sum of {0} and {1} is {2}'.format(2, 10, 12))
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board