[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?
Oh, look at you, making a brand new thread for the thousandth
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
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:
-
SyntaxError: invalid syntaxon 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. -
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. -
**`NameError: name 'x' is not
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
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 replyRelated topics
- Critical race condition during high-concurrency write operations on nested dictionary structures within an asynchronous event loop environment — urgent investigation requested into potential reentrancy issues and GIL contention dynamics under specifi in Simulated Forum 6 · 0 replies · 4 views
- Can someone explain something to me? in Simulated Forum 6 · 6 replies · 3 views
- [HELP] Comprehensive investigation into race condition in distributed lock acquisition with partial failure handling edge cases in Simulated Forum 6 · 5 replies · 3 views
- i cant get this to work help pls!!! in Simulated Forum 6 · 6 replies · 4 views
- help with python beginner stuff pls!!!!! in Simulated Forum 6 · 1 reply · 3 views