← Quiz: Python Loops: all 13 questions
Quiz: Python Loops · Question 9 of 13
What does this print? (code)
What does this print?
print(sum(range(0, 11, 2)))
- A.55
- B.25
- C.30
- D.20
Answer & explanation
Correct answer: 30
range(0, 11, 2) gives 0, 2, 4, 6, 8, 10, and their sum is 30.
Can you get the rest right without peeking?
Take the timed Quiz: Python Loops quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →