ACTIVITY 22 / 50
Try as many times as you needCountdown
Let’s understand
range can take a third argument: the step. range(5, 0, -1) counts down from 5 to 1. Zero is excluded. Use a negative step to count down.
Listen to the explanation
Example
for n in range(4, 1, -1):
print(n)Print 3, 2, 1, then START. Put each on its own line.
I need a hint
After for, use an unindented print for START.
How to find an error
- Read the last line of the error message.
- Find the indicated line. Check quotes, parentheses and indentation.
- Change one thing and run again.
main.py
4 spaces
Your draft stays in this browser.
Result
PythonYour program’s output will appear here. Click Run.
Мой профиль