ProgrammingVery hardTCS CodeVita · Infosys HackWithInfy
What is printed?
What is printed?
print(int(str(2 ** 70)[:5]), len(str(2 ** 70)))
- A. 11805 22
- B. 11805 21
- C. 11804 22
- D. 11805 23
Correct answer: A. 11805 22
2**70 = 1180591620717411303424, which starts with 11805 and has 22 digits.
More Python Programming questions
- What is printed? python print(list(range(10, 0, -4)), [sum(r) for r in [(1, 2), (3,)]])
- What is printed? python print(2 0.5 2 0.5, 2 0.5 2 0.5 == 2.0, round(2 0.5 2 0.5))
- What is printed? python print(min(map(str, [10, 9, 100])), sorted(['10', '9', '100']), sorted([10, 9, 100]))
- What is printed? python print(len([x for x in range(10) if x % 3 == 0]), sum(range(0, 10, 3)))
- What is printed? python x = [3, 1, 2] y = sorted(x) x.sort(reverse=True) print(x, y, x is y)
- What is printed? python print(list(map(sum, zip([1, 2], [3, 4]))), list(zip([[1, 2], [3, 4]])))