Ask coding questions

← Back to all posts
Syntax Error on Line 22
thompsonimani (0)

Hi everyone.

I am completely stumped. I am not sure what I am getting an error on line 22. I have tried changing the indention to see if that fixes it but nothing is working. Can I get another pair of eyes to see what I am missing?

Thank you in advance/

Comments
hotnewtop
InvisibleOne (3186)

Missing parenthesis on line 19. Pretty much if you are getting a weird error in python, look a few lines up and check for any missing parenthesis, comma's, or equal signs.

Coder100 (18818)

Here's the error:

You forgot a closing ')'
so change line 19 to:

  mode1Number = print(float(input("Enter " + bin(randomNumber) + " as a decimal number.: ")))

python doesn't tell you the error until it's too late, so go back to where you mad the previous opening parentheses for easy finding of errors

IMayBeMe (527)

The error is actually on line 19, add another parenthesis at the end and it should work