ProgrammingVery hardJEE Main · CAT placement
What is printed?
What is printed?
print(int.from_bytes((65).to_bytes(1, 'big') * 3, 'big'), 65 * 65 * 65, bytes([65] * 3).decode())
- A. 4276545 274625 AAA
- B. 4276545 274625 AAB
- C. 4276546 274625 AAA
- D. 4276545 274626 AAA
Correct answer: A. 4276545 274625 AAA
Three bytes of 0x41 read big-endian give 0x414141, which is 4276545. 65 cubed is 274625, and the bytes decode to the string AAA.
More Python Programming questions
- What is printed? python print(max(['10', '9'], key=len), max(['10', '9']), max([10, 9], key=str))
- What is printed? python print(10 == 10.0 and 'a' == 'a', 1 < 2 or 1 / 0)
- What is printed? python print(sum(x for x in range(1, 101) if x % 3 == 0 or x % 5 == 0))
- What is printed? python print(int(float(253)) == 253, float(253 + 1) - 253, (253 + 1) - 253)
- What is printed? python print('a'.join('xyz'), 'xyz'.join(['a']), 'ab'.join(['', '']), ','.join(map(str, [1.0, 2])))
- What is printed? python print(round(0.5 3), round(4.5) + round(5.5), int(2.9999999999999996), int(3.0000000000000004))