Level 00 — Absolute Beginner¶
Home: README
Estimated time: ~5 hours
Who this is for¶
You have never written a line of code in your life. You may not know what a "terminal" is. That is completely fine. This level will get you there.
What you will learn¶
- How to open Python and type commands
- What variables, numbers, and text (strings) are
- How to make decisions in code (if/else)
- How to repeat things (loops)
- How to organize code (functions)
- How to read a file
Before you start¶
- Complete 00_COMPUTER_LITERACY_PRIMER.md if you have never used a terminal.
- Complete 03_SETUP_ALL_PLATFORMS.md to install Python.
- Confirm
python --versionworks in your terminal.
Exercises (do them in order)¶
- 01-first-steps — Open Python, type
2 + 2, see the answer - 02-hello-world — Your first
print()statement - 03-your-first-script — Create and run a
.pyfile - 04-variables — Store values and use them
- 05-numbers-and-math — Arithmetic operations
- 06-strings-and-text — Working with text
- 07-user-input — Ask the user for information
- 08-making-decisions —
if,else, and comparisons - 09-lists — Collecting multiple items together
- 10-for-loops — Doing something for each item
- 11-while-loops — Repeating until a condition is met
- 12-dictionaries — Labeled data storage
- 13-functions — Reusable blocks of code
- 14-reading-files — Getting data from files
- 15-putting-it-together — A complete mini-program
How to work through each exercise¶
- Read the
.pyfile — every line has a comment explaining what it does - Run it —
python exercise.pyand see what happens - Change something small and run again
- Try the challenges in
TRY_THIS.md - Move on when you can explain what the code does without reading the comments
Try in your browser (no install needed)¶
Want to try Python before installing anything? Run these exercises directly in your browser:
Uses Pyodide to run real Python in your browser with a code editor and output panel.
Important¶
- There are no tests at this level. Just run and observe.
- There is no wrong way to experiment. Break things. That is how you learn.
- If something does not work, read the error message. It usually tells you exactly what went wrong.
- You do not need to memorize anything. You need to understand the pattern.
When you are done¶
You are ready for Level 0 when you can:
- Create a .py file from scratch
- Use variables, a loop, and a function in the same script
- Read a simple error message and fix the problem
- Explain what your code does in plain English
| ← Prev | Home | Next → |
|---|---|---|