ProgrammingModerateTCS NQT · Wipro pattern

What is printed?

What is printed?
print(str(3) + str(4) == '34', 3 + 4 == 7, '3' + '4' == 7)
  1. A. True False False
  2. B. False True False
  3. C. True True True
  4. D. True True False

Correct answer: D. True True False

str(3) + str(4) is the string 34, which equals '34'. 3 + 4 is 7, and the string '34' is never equal to the integer 7.

More Python Programming questions

Exams that ask this topic