12:15 code and indent correct same error message no matter what


#1

Here is my code

n = [3, 5, 7]

def total(numbers):
result = 0
for i in numbers
result = result + i
return result

I get the message

File "python", line 5
for i in numbers
^
SyntaxError: invalid syntax


#2

You should review for loops. You need a colon.


#3

Aaaah, thank you very much. an extra pair of eyes.

Added colon to
for i in numbers:
and it's all good.