Ask coding questions

← Back to all posts
Glitchy Glitch Glitch!!
AmBacon

I was writing a python code and repl.it underlined it saying it was a syntax error... I knew it was not... I reloaded the page, restarted my browser and did everything I could to fix it. It still did not work. Just for info, I was on Opera GX browser at that time. Maybe it's the browser. IDK

Answered by MrVoo [earned 5 cycles]
View Answer
Voters
AmBacon
Comments
hotnewtop
MrVoo

You DO have a syntax error.

AmBacon

Wait... I don't get it... What do I have to do to fix the problem.. (srry I am asking a lot of questions!)

AmBacon

One more thing... It says the ">" sign is an error... What do I do here?

AmBacon

Nevermind, I have got it. Do you know how I could make python detect whether the input is an even or odd number?

Coder100

use if input % 2 == 0 to see if it is even. The % operator tells you the remainder, and so if it is 0 that means it is even! @AmBacon

Coder100

Here is your error on line 1!

do you see it?

You forgot a closing )

Reminder: never ever blame the language first, blame yourself first!

AmBacon

OK, thx everyone!!

Coder100

mark as correct answer? @AmBacon