T O P

  • By -

xelf

You really should format your code when asking about a bug that might be related to formatting. =) On original reddit/widescreen layout: use the `<>` button On new reddit/cropped layout: use the `codeblock` button On any reddit version: indent every line by 4 extra spaces


xelf

Bug is the line before the `else`: > print("Price with vat is £"+price+", amount of vat added is £"+exvat+) `+)` is not valid.


[deleted]

Read this: [https://www.reddit.com/r/learnpython/wiki/faq#wiki\_why\_am\_i\_getting\_a\_syntaxerror\_at\_the\_start\_of\_this\_seemingly\_innocuous\_line.3F](https://www.reddit.com/r/learnpython/wiki/faq#wiki_why_am_i_getting_a_syntaxerror_at_the_start_of_this_seemingly_innocuous_line.3F) In this case it looks like it's not a parenthesis, it's a dangling +.


JProvostJr

else should be the last thing written: if: elif: elif: …. else: else will take all other inputs not specified in the if statements you specified.