Skip to content
Invalid Syntax
Profile icon
HunterBerg

how do i fix this? (line 53)
pyrthon

You are viewing a single comment. View All
Profile icon
trg5503

Remove the blank line between the "break" and "else"

Profile icon
HunterBerg

@trg5503
didnt work

Profile icon
trg5503

@HunterBerg
I was looking at the wrong line, now I see your issue

Python uses whitespace very strictly, unlike many other general languages like JavaScript. Since your "else" statement on line 52 matches the same whitespace as the bit above, it doesn't correctly match it up with the if statement.

You can fix this by removing 2 spaces before the "else"

Profile icon
HunterBerg

@trg5503
is this what you mean
python2

Profile icon
HunterBerg

@trg5503
if it is it doesnt work

Profile icon
valanbechtold

unindent the else: and continue once, it should read on the same lines as your if sq2 == "yes"


@HunterBerg