(Q) What is the output of the following?
try:
if '1' != 1:
raise "someError"
else:
print("someError has not occurred")
except "someError":
print ("someError has occurred")
A. someError has occured
B. someError has not occured
C. invalid code
D. none of the mentioned
(Q) Which one of these is floor division?
A. //
B. /
C. %
D. None of the mentioned
(Q) Which of the following expressions results in an error?
A. int(‘1011’)
B. int(1011,2)
C. int(‘1011’,23)
D. int(1011)
(Q) What error will occur when you execute the following code?
MANGO = APPLE
A. NameError
B. SyntaxError
C. TypeError
D. ValueError
(Q) Study the following statement:
>>>"a"+"bc"
What will be the output of this statement?
A. a+bc
B. abc
C. a bc
D. a
(Q) Which of the following option is not a core data type in the python language?
A. Dictionary
B. Lists
C. Class
D. All of the above
(Q) Study the following statements:
>>> print(ord('h') - ord('z'))
A. 18
B. -18
C. 17
D. -17
(Q) All keywords in Python are in _
A. UPPER CASE
B. Capitalized
C. lower case
D. None of the mentioned