Top 1000+ Solved Problem Solving and Python Programming MCQ Questions Answer
Q. What type of data is: a=[(1,1),(2,4),(3,9)]?
a. array of tuples
b. list of tuples
c. tuples of lists
d. invalid type
Q. ,2,3
a. yes, this is an example of tuple unpacking. a=1 and b=2
b. yes, this is an example of tuple unpacking. a=(1,2) and b=3
c. no, too many values to unpack
d. yes, this is an example of tuple unpacking. a=1 and b=(2,3)
Q. Which of the following statements create a dictionary?
a. d = {}
b. d = {“john”:40, “peter”:45}
c. d = {40:”john”, 45:”peter”}
d. all of the mentioned
Q. Operators with the same precedence are evaluated in which manner?
a. left to right
b. right to left
c. can’t say
d. none of the mentioned
Q. Which one of the following has the same precedence level?
a. addition and subtraction
b. multiplication, division and addition
c. multiplication, division, addition and subtraction
d. addition and multiplication
Q. Which one of the following has the highest precedence in the expression?
a. exponential
b. addition
c. multiplication
d. parentheses