What you’ll learn in this chapter #
- Experience the two main ways to run Python (interactive REPL and scripts)
- Understand how to work with the most common data types: numbers, variables, and strings
- Write small programs that use
printandinput
Expect to spend about 60–90 minutes. If time is tight, complete “Step 1” in roughly 20 minutes and revisit the remaining steps later.
Look back at the journey so far #
| Chapter | Skills you already gained | New skills you add here |
|---|---|---|
| 00 Introduction | Prepared your environment and mapped your study plan | Ready-to-run setup for writing code |
| 01 Python Basic Syntax (this chapter) | — | Handle values, display output, and accept user input |
The fundamentals here directly support the next chapter on conditionals and loops.
Where this fits in the bigger picture #
graph LR A[Getting started<br>Environment setup] --> B[Basic syntax<br>Working with values (this chapter)] B --> C[Conditionals & Loops] C --> D[Data structures & Functions] D --> E[Using modules] E --> F[Building projects] classDef highlight fill:#2563eb,color:#fff,font-weight:700; class B highlight;
Study tips #
- Copy the examples exactly once, then change a small part (for example, tweak the message)
- Try functions like
type()andlen()in the REPL immediately and note down the results - For the practice tasks, follow this flow: 5 minutes on your own → check the hint → reveal the answer
Step-by-step roadmap #
- Run Python for the first time
- Numbers and operators
- Variables, assignment, and naming
- Strings and input/output
- Wrap-up and practice
After each step, type the code yourself; repetition is the fastest route to long-term retention.