ProgrammingModerateTCS NQT · Infosys

What is printed?

What is printed?
print(str(3) * 2 + str(3 * 2), int(str(3) * 2) + 3 * 2)
  1. A. 336 36
  2. B. 333 39
  3. C. 66 39
  4. D. 336 39

Correct answer: D. 336 39

str(3) * 2 is '33' and str(6) is '6', so the text is '336'. int('33') + 6 is 39, which is a number, not text.

More Python Programming questions

Exams that ask this topic