$ ./guess_the_languageProblem Solving — fix the bug
Problem Solving — fix the bug · easy · #6

What is the correct fix?

total = 0
for i in range(5)
  total += i
  1. Remove range from the header
  2. Add a colon after range(5)
  3. Change += to =+ in the body
  4. Use while instead of for
A for statement header must end with a colon.
Play Problem Solving ▸