Ask coding questions

← Back to all posts
I do not know what the mistake is

You're missing a closing parenthesis at the end of line 19.
(You don't actually need the first opening parenthesis right before random, though)


" randomone = (random.randint(0,9) "
^ ^ ^
open paren open paren close paren
as you can see, you have 2 opens and 1 close, toss another one on the end there.
also, this ide uses bracket matching, so typing (, [, or { will create a respective ), ], or }. HOWEVER, if you have your cursor right before the closing bracket and you type a closing bracket character, it won't input any character and will instead move the cursor one tick forward, which is probably how you got this error. in a situation with two close parens, you have to type ')' twice instead of once.


It could be a missing parenthesis in line 19...

Just kidding. ;-) I only wanted to add that you can't trust the error message in cases like this. So whenever you got a Syntax Error and can't find the error it is probably a missing parenthesis in the line ABOVE the line shown in the message.


You're missing a parenthesis at the end of line 19


Missing closing parenthesis on line 19