Top 1000+ Solved Problem Solving and Python Programming MCQ Questions Answer
Q. Given a function that does not return any value, What value is thrown by default when executed in shell.
a. int
b. bool
c. void
d. none
Q. Which of the following will run without errors?
a. round(45.8)
b. round(6352.898,2,5)
c. round()
d. round(7463.123,2,1)
Q. >>>example("hello")
a. indentation error
b. cannot perform mathematical operation on strings
c. hello2
d. hello2hello2
Q. In order to store values in terms of key and value we use what core data type.
a. list
b. tuple
c. class
d. dictionary
Q. Which of the following results in a SyntaxError?
a. ‘”once upon a time…”, she said.’
b. “he said, ‘yes!\” c) ‘3\\’
Q. Which of the following is not a complex number?
a. k = 2 + 3j
b. k = complex(2, 3)
c. k = 2 + 3l
d. k = 2 + 3j