ProgrammingVery hardProduct-company MCQ pattern
What is printed?
What is printed?
print(len(str(7**1000)), 7**1000 % 10)
- A. 846 1
- B. 846 7
- C. 845 1
- D. 847 1
Correct answer: A. 846 1
7 to the power 1000 has 846 digits. The last digit of powers of 7 repeats 7, 9, 3, 1, and 1000 is a multiple of four, so the last digit is 1.
More Python Programming questions
- What is printed? python print(10 -3 1000 == 1, 10 -3 1000)
- What is printed? python print(int('12' 2) + int('3' 2), len({'x' n for n in range(4)}))
- What is printed? python print(bin(6 & -6), bin(6 | -6), bin(6 ^ -6))
- What is printed? python print(hex(28 - 1), oct(29), bin(24))
- What is printed? python print(str(0.5), str(0.25 + 0.125), 0.1 + 0.25)
- What is printed? python s = 'a,b;c' print(s.split(',;'), s.replace(';', ','), s.split(';'))