Newb Syntax Error | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Newb Syntax Error

Why am I getting syntax error on the n on line 6(n += -1)? https://code.sololearn.com/cEFLVf2xDYo4

12th Dec 2021, 2:19 AM
Michael Bucky Webb
Michael Bucky Webb - avatar
3 Answers
+ 2
Remove that starting bracket from int(input()). also, your conditional statement's indentation doesn't look proper
12th Dec 2021, 2:41 AM
zexu knub
zexu knub - avatar
+ 1
Michael Bucky Webb Yes & that's how it's suppose to be, cause if you are coming from any other languages then Python strictly cares about the indentations.
12th Dec 2021, 3:01 AM
zexu knub
zexu knub - avatar
0
That worked, thanks! Does the indentation look better now?
12th Dec 2021, 2:58 AM
Michael Bucky Webb
Michael Bucky Webb - avatar