← Quiz: Python Interview Programs: all 13 questions
Quiz: Python Interview Programs · Question 3 of 13
What does this print? (code)
What does this print?
print(sum(int(d) ** 3 for d in "153"))
- A.9
- B.153
- C.27
- D.135
Answer & explanation
Correct answer: 153
1 + 125 + 27 = 153 — that's why 153 is an Armstrong number.
Can you get the rest right without peeking?
Take the timed Quiz: Python Interview Programs quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →