In: Computer Science
Write 5 questions about Object Oriented Programming in
Python.
Each question should have 7 options. Please provide 7 answer
options for EACH question and the select answer for EACH
question
Q-1 Which of the following data types is not supported in python?
A - Numbers
B - String
C - List
D - Slice
E - All of the Above
F-None of the Above
G- A and B
Answer: D
Q-2 What is the output of print str[0] if str = 'Hello World!'?
A - Hello World!
B - H
C - ello World!
D - None of the above.
E - Syntax Error
F- RunTime Error
G - !
Answer:B
Q-3 What is the output of print tinytuple * 2 if tinytuple = (123, 'john')?
A - (123, 'john', 123, 'john')
B - (123, 'john') * 2
C - Error
D - None of the above.
E- All of the above
F - 12
G - 23
Answer: A
Q-4 Which of the following function convert a String to a list in python?
A - repr(x)
B - eval(str)
C - tuple(s)
D - list(s)
E - toList(s)
F - makeList(s)
G - none of the above
Answer: D
Q-5
Which of the following statement causes the loop to skip the remainder of its body and immediately retest its condition prior to reiterating?
A - break
B - continue
C - pass
D - None of the above.
E - All of the above
F - go
G - goOn
Answer: B