References: Python Code Structure¶
-
Python (programming language) — Wikipedia An overview of Python's history, design philosophy, and syntax principles. Covers why Python's creators prioritized readable, clean code structure with meaningful whitespace and consistent indentation as core language features.
-
Indentation (programming) — Wikipedia Explains how indentation is used across programming languages to indicate code blocks. Especially relevant here because Python uses indentation as actual syntax — not just style — to define the structure of programs.
-
Reserved word — Wikipedia Describes keywords and reserved words in programming languages. Directly relevant to Python's set of keywords such as
if,for,while, anddef, which cannot be used as variable names and define Python's grammar. -
Python for Kids by Jason R. Briggs (No Starch Press) Written for younger learners, this book introduces Python syntax, indentation, and code structure with humor and visual examples. Closely matches this chapter's audience of students ages 10–13 new to text-based programming.
-
Python Crash Course by Eric Matthes (No Starch Press) A popular beginner-to-intermediate Python book that covers syntax rules, proper indentation, and code readability in its early chapters. Useful supplemental reading for students who want a thorough, example-driven introduction to Python structure.
-
Python Official Docs — Lexical Analysis The authoritative reference for Python's grammar, keywords, indentation rules, and whitespace handling. Explains exactly how Python parses code structure — foundational for understanding why syntax rules exist.
-
W3Schools — Python Syntax A concise, beginner-friendly explanation of Python syntax including indentation, comments, and code blocks. Includes interactive "Try it Yourself" examples that let students experiment with structure directly in the browser.
-
Real Python — Python Keywords A comprehensive guide to every Python keyword with plain-language explanations and examples. Helps students understand which words Python reserves for its own grammar and why they cannot be used as variable names.
-
Programiz — Python Indentation Explains Python statements, indentation, and comments with clear examples and diagrams. Directly covers the rules Python enforces for code blocks, making it ideal reading alongside this chapter's content.
-
CS Circles — Python Indentation and Blocks An interactive, browser-based Python course from the University of Waterloo. This unit focuses on conditionals and indented code blocks, letting students practice structuring code correctly with immediate in-browser feedback.