ProgrammingModerateTCS NQT · Wipro pattern
What is printed?
What is printed?
print(str(3) + str(4) == '34', 3 + 4 == 7, '3' + '4' == 7)
- A. True False False
- B. False True False
- C. True True True
- 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
- What is printed? python print(len(''), len(' '), len('t'), ''.isspace())
- What is printed? python print(1 + '1' if False else '1' + str(1), '3' 2 + str(4 - 1), int('3' 2) + 4 - 1)
- What is printed? python print(bool(0 or '' or []), bool([[]]), bool([0]), bool(' '.strip()))
- What is printed? python print(round(2.345, 2), round(2.355, 2), round(7.5), round(8.5))
- What is printed? python print(len([x for x in range(3) for y in range(x)]), [x y for x in range(3) for y in (1, 2) if x], sum(1 for i in…
- What is printed? python data = {'a': 1} print(data.get('b', 0) + 1, data.get('a') + 1, 'a' in data, 1 in data.values())