ProgrammingHardTCS NQT · Infosys
What is printed?
What is printed?
print(len(str(2 ** 64)), str(2 ** 64)[:4], 2 ** 64 % 1000)
- A. 19 1844 616
- B. 20 1844 616
- C. 20 1844 615
- D. 20 1845 616
Correct answer: B. 20 1844 616
2**64 has twenty digits, and its first four digits are 1844. The last three digits are 616.
More Python Programming questions
- What is printed? python print('%c%c' % (72, 105), chr(0x263A) == 'u263a', ord('A') + 1, chr(ord('a') + 25))
- What is printed? python print(sum(i i for i in range(10)), sum(range(10)) 2 == sum(i 3 for i in range(10)), sum(range(10)) 2)
- What is printed? python print(f'{3.14159:.2}', f'{"abc":.2}', f'{0.5:.0%}')
- What is printed? python from fractions import Fraction print(Fraction(1, 2) + 0.5 == 1, Fraction(1, 3) 3 == 1, type(Fraction(1, 2) +…
- What is printed? python print(max(-3, 2, key=abs), min(-3, 2, key=abs), sorted([-3, 2, -2], key=abs), sorted([-3, 2, -2], key=lambda v…
- What is printed? python print(1 - 0.9 == 0.1, round(1 - 0.9, 1) == 0.1, 1 - 0.9 > 0.09, 1 - 0.9)