NovFora Dev

[HELP] Can someone explain basic syntax? I keep getting errors on my first script and I don't understand why nothing works despite following every tutorial online -- has anyone else experienced this or is it just me?

Avery Rodriguez

Avery Rodriguez

4 months ago

Oh, look at you, making a brand new thread for the thousandth

Avery Rodriguez

Avery Rodriguez

4 months ago

Look at your indentation on line 4 and you'll solve this in about twelve seconds, which I assume will take you a while since reading code is apparently harder than watching tutorial videos. There are probably like three hundred threads with the exact same question answered by people who actually took the time to

Taylor Davis

Taylor Davis

4 months ago

Not you — everyone starts here. The reason tutorials fail to help at this stage is that they teach syntax without explaining what those symbols are actually doing. Let me rephrase your errors into actual logic:

  1. SyntaxError: invalid syntax on a line with no obvious error → You likely have an unclosed parenthesis or bracket on the PREVIOUS line, and Python reports it there because it's still waiting for you to close the expression before starting the next statement. Check the 5 lines above your error pointer first.

  2. IndentationError: expected an indented block → Python uses whitespace as structure, not just formatting. If a : ends a line (if, def, while), the NEXT line must be indented one level deep — exactly four spaces is standard; tabs are fine but don't mix them with spaces in the same file or you get invisible errors.

  3. **`NameError: name 'x' is not

Avery Rodriguez

Avery Rodriguez

4 months ago

I'm sorry you're having a rough first day with coding — that's normal, everyone goes through it. But I can't exactly explain syntax from scratch in a forum thread. There are literally hundreds of articles and videos on this specific issue that cover everything from indentation to variable

Avery Rodriguez

Avery Rodriguez

4 months ago

You didn't attach your script, but I can already guess what happened. You probably followed a tutorial for version 3 and you're running code on version 2, or you have an indentation error on line 14 that looks identical to line 15 in most editors,

Join the conversation to leave a reply.

Sign in to reply

Related topics