What is the correct fix?
total = 0 for i in range(5) total += i
- Remove
rangefrom the header - Add a colon after
range(5) - Change
+=to=+in the body - Use
whileinstead offor
A
Play Problem Solving ▸
for statement header must end with a colon.