Skip to content

Tag Archives: Python-Quizzes-Output Type

What is the output of the following code?  Python3 print tuple[1:3] if tuple == ( \'abcd\', 786 , 2.23, \'john\', 70.2 ) else tuple() (A)… Read More
What will be displayed by the following code? def f(value, values):     v = 1     values[0] = 44 t = 3 v = [1, 2, 3] f(t, v) print(t, v[0]) (A) 1 1 (B) 1 44 (C) 3… Read More
What is the output of the following program :  Python3 i = 0 while i < 3:     print i     i += 1 else:     print 0… Read More
What is the output of the following program :  Python3 print \'{0:-2%}\'.format(1.0 / 3) (A) 0.33 (B) 0.33% (C) 33.33% (D) 33% Answer: (C)Explanation: The… Read More
What is the output of the following program :  Python3 print \'{0:.2}\'.format(1.0 / 3) (A) 0.333333 (B) 0.33 (C) 0.333333:-2 (D) Error Answer: (B)Explanation: .2… Read More

Start Your Coding Journey Now!