Sum numbers with a loop
Python in your browser. Run and check results on your device. No Python installation; results do not count towards course mastery.
The environment provides n. Add the integers from 1 through n inclusive and print the total.
For n = 5, expect 15. For n = 0, expect 0.
Complete the loop body. Do not use input or replace n with a constant: the checker executes your program with different values.
Python indentation matters. On a phone, use the “Indent +4” button if needed.