ProgrammingModerateTCS NQT · Wipro pattern

What is printed?

What is printed?
print(max(3, 3.5, 2), min('b', 'a', 'c'), max([1, 2], [1, 3]))
  1. A. 3 a [1, 3]
  2. B. 3.5 a [1, 2]
  3. C. 3.5 a [1, 3]
  4. D. 3.5 c [1, 3]

Correct answer: C. 3.5 a [1, 3]

3.5 is the largest number. min of letters is the smallest, a, and lists compare element by element, so [1, 3] beats [1, 2].

More Python Programming questions

Exams that ask this topic