Learning Python in eight weeks
An eight-week plan for adults teaching themselves Python: one small project a week, how to read error messages, and what to do when you get stuck.
In short
You have probably started Python before. You watched a few videos, followed along, felt fine, and then faced an empty file and had no idea what to type. That gap is normal. Watching code is not the same as writing it, and the fix is to write a lot of small, ugly programs.
This plan assumes about an hour a day, five or six days a week. If you have less, stretch each week to two. The order matters more than the speed.
In short
- Learn the basics in short bursts, then spend most of your time writing small programs that do something you care about.
- Each week has one project that uses the new idea plus everything before it.
- Reading errors is a skill: read the last line first, then the line number, then the line above it.
Who this plan suits
It is for adults with no programming background who want to make useful scripts: renaming files, tidying a spreadsheet export, doing a calculation you keep repeating. It is not a plan for becoming a professional engineer in two months, and it does not promise a job. It gets you to the point where you can build small tools and keep learning on your own.
Install Python from the official python.org downloads page and use any plain code editor. Avoid spending the first week choosing tools.
How each week works
1. Learn the basics for 20 minutes
Read or watch one short lesson on the week's idea. Type every example yourself. Do not copy and paste.
2. Change the examples
Break each one on purpose. Change a number, delete a colon, misspell a name. Seeing the error you caused teaches you what that error means.
3. Build the week's project
Write it from a blank file. When you are stuck for more than fifteen minutes, look up one hint, close it, and keep going.
4. Extend it
Add one feature nobody asked for. This is where the learning sticks.
The eight weekly projects
Week | New idea | Small program |
|---|---|---|
1 | Variables, numbers, | Bill splitter |
2 |
| Number guessing game |
3 | Strings and lists | Word counter for a pasted paragraph |
4 | Reading and writing files | Command line to-do list saved to a file |
5 | Dictionaries | Tally of how often each word appears |
6 | Functions | Unit converter with one function per conversion |
7 | Modules, | Summary of a CSV of expenses |
8 | Putting it together | A tool for a real chore of your own |
Week 1 in full: a bill splitter
Here is the first project, so you can see the size of what I mean by a small program. Say a dinner costs 84.00, you want to tip 20% (that is 0.20 as a decimal), and four people split it.
bill = 84.00
tip_rate = 0.20
people = 4
tip = bill * tip_rate
total = bill + tip
per_person = total / people
print("Tip:", tip)
print("Total:", total)
print("Each pays:", per_person)Check it by hand: 84.00 × 0.20 = 16.80, so the total is 84.00 + 16.80 = 100.80, and 100.80 ÷ 4 = 25.20. If your program prints different numbers, find the line that disagrees with your arithmetic. Then extend it: replace the three fixed numbers with input() calls, remembering that input gives back text, so you need float(...) around it.
Notice what this one project already covers: variables, arithmetic, output, and converting types. Later weeks add one idea each on top.
Reading errors without panic
Python errors look scary but follow a pattern. Suppose you misspell a variable in the splitter, writing print("Total:", totl). You get a block of text ending in a line like this:
NameError: name 'totl' is not defined- Read the last line first. It names the kind of error and says what went wrong.
- Read the line number just above it. That is where Python noticed the problem, which is often the line itself.
- If that line looks right, look at the line before it. A missing bracket or quote earlier can make the next line fail.
- Only then search the exact message. Paste the last line, not your whole program.
Keep a file called errors.txt and write down each error and what caused it. By week four you will recognize most of them on sight.
If something goes wrong
- You understand the lesson but cannot start the project. Write the steps as plain English comments first, then turn each comment into one or two lines of code.
- It works but you do not know why. Add a
printafter each line to see the values change. Remove them later. - You fell behind a week. Do not double up. Repeat the project you missed with a smaller goal and carry on.
- Everything feels too easy, then suddenly too hard. Normal. Functions in week 6 are the usual bump. Rewrite an older project using functions rather than starting something new.
Tip
Never run code you do not understand that deletes or moves files. In week 4 and later, test on a folder of copies first.
Keep it going after week eight
Pick one chore you do every week and automate it. Share the code with one person, even a friend who does not program, and watch where they get confused. Then read other people's short scripts and ask what each line does.
If you want help reading a confusing error, DuckyHelper can see your editor and terminal on your screen and talk through it out loud. Try it for 10 minutes, no card.
Frequently asked questions
- Should I learn from videos or a book?
- Either works. What matters is that you type the code, change it and build the weekly project from a blank file.
- Do I need to be good at math?
- No. The projects here use arithmetic you already know. More math helps later in specific areas like data analysis.
- What comes after the eight weeks?
- Choose a direction that matches a real goal: automating files, analyzing data, or building small web tools. Learn only what that project needs.