Never coded? Start programming with Python here
Learn to program from zero with free Python courses: variables, loops and functions, practice with Harvard's CS50 Python, then build your own small game.
- For you if
- You have never programmed, or you tried once and got lost. You have a computer and 3–5 hours a week.
- Not for you if
- You already write small Python scripts with loops and functions. Start with “Know Python basics? Start data analysis here” →
Steps in order
-
Free 37 lessons
Learn the building blocks: variables, conditions, loops, functions
A gentle start from absolute zero. Type every example yourself; reading code is not the same as writing it.
Learn Python from Scratch | Programming for Beginners Open course → Also useful for this step ↗ -
Free 3 weeks of material
Practise with Harvard's CS50 Python (weeks 0–2)
Harvard's free CS50 course covers functions, conditionals and loops with short problem sets. Do the first three weeks to lock in the basics; the rest is a great follow-up.
Open -
Project An evening or two
Build a number-guessing game and put it on GitHub
The program picks a random number from 1 to 100. The player guesses; the program says “higher” or “lower” until it's right, then shows how many tries it took. Bonus: let the player choose a difficulty.
Open
Good free resources elsewhere
- Free course Harvard CS50's Introduction to Programming with Python (opens in a new tab) Free lectures and problem sets. A paid certificate is optional.
- Tool pythontutor.com Python Tutor (opens in a new tab) Paste your code and watch it run line by line. Perfect when a loop does something unexpected.
- Free course Dr. Chuck / py4e.com Python for Everybody (opens in a new tab) Free book, lectures and auto-graded exercises if you want a second explanation.
- Docs python.org The official Python tutorial (opens in a new tab) The reference once you know the basics. Use it to look things up, not to start.
Who this is for
If you have never written code, start here. Python reads almost like English, is free, and is used for websites, data, automation and AI, so nothing you learn here is wasted.
Plan for about 3–4 weeks at 3–5 hours a week.
Get set up
You can begin without installing anything: the first course and Harvard’s CS50 Python both explain their setup. Want Python on your own computer? Download it from python.org and use any code editor, such as VS Code.
Tips that make the difference
- Little and often beats long sessions. 30 minutes a day sticks better than 4 hours on Sunday.
- Errors are normal. Read the last line of the error message first; it usually says exactly what went wrong.
- Explain your code out loud. If you can’t say what a line does, paste it into Python Tutor and watch it run.
- Don’t collect courses. Finish the steps here before starting anything new.
Your project checklist
- The game picks a random number with
random.randint(1, 100). - It keeps asking until the guess is right, using a loop.
- It handles bad input, such as letters, without crashing.
- It prints the number of tries at the end.
- The code is on GitHub with a short README explaining how to run it.
Frequently asked questions
Am I too old, or bad at maths, to learn programming?
No. Beginner programming needs logic and patience, not advanced maths. People start at every age.
Which language should I learn first?
Python is the most common first language because its syntax is simple and the skills transfer to any other language.
What comes after this path?
Pick a goal: analysing data with Python, building websites, or AI and machine learning. Each has its own free path.
