Python
Topic 1 · Getting started · ⏱ about 30 min

Python Course: Start Here

No experience needed. What you will learn, how long it takes, how each lesson works, and where to run your code: in this page, in the playground, or on your own computer.

Show:
In this topic
Beginner

Who this course is for

This course is for you if you have never written a line of code, or if you tried before and got lost. Every idea is explained in plain words first, with an everyday comparison, before any code. Nothing is assumed: if a word is new, it is explained the first time it appears, and each lesson ends with a Key words box.

By the end you will be able to write real programs: read and clean data files, make decisions, repeat work, organise code into functions and classes, and use the three libraries every data scientist uses (NumPy, pandas and Matplotlib). That is exactly the starting point for machine learning and AI.

How long does it take?

About 30–40 hours in total. At 30–45 minutes a day, that is 6–8 weeks. Each lesson takes 45–90 minutes. Going slowly and practising every day works far better than rushing.

Beginner

What you will learn

PartLessonsYou will be able to…
1. Getting startedSet up Python, your first programrun Python in the browser and on your own computer, print things and read input
2. Python basicsValues and variables, strings, conditions, loops, lists, dictionaries, functionswrite programs that make decisions, repeat work and organise data
3. Writing real programsErrors, files, modules, classes, Pythonic style, first projectsbuild small complete programs that read files, handle mistakes and use libraries
4. Python for dataNumPy, pandas, plottinganalyse a table of data and draw charts
5. ToolsDeveloper toolkit, checkpointuse the terminal, git and tests like a professional
Try it

How a Python program runs

Step through what happens between typing code and seeing a result. You do not need to remember this now; come back to it whenever an error message seems mysterious.

Interactive: this part runs in your browser.

Beginner

How each lesson works

  1. Read the idea in plain words. Press play at the bottom of the page if you prefer to listen.
  2. Run the examples. Every dark code box with a ▶ Run button runs real Python inside this page. Press ✎ Edit and experiment, change something, and run it again. Breaking code on purpose is one of the fastest ways to learn.
  3. Watch the code run. Some lessons have step-by-step demos that show every variable changing, one line at a time.
  4. Practise. Each lesson ends with short exercises. Write the code, press ✔ Check my answer, and the page tells you exactly what is right and what is not. Use the hints when you are stuck: that is what they are for.
  5. Quiz. A few questions to check the ideas stuck. Come back to the quiz a few days later: remembering after a gap is what makes it permanent.
Beginner

Where to run your code

You have three options, and you can use all of them:

  • In this page. Nothing to install. The first run downloads Python into your browser (once), then it is quick.
  • In the Python playground. A full editor with sample datasets, a list of your variables, and error messages explained in plain English. Every example in the course has an Open in playground button.
  • On your own computer. This is how real projects are built. The next lesson, Set up Python on your computer, walks you through it step by step for Windows, macOS and Linux. You can do it now or later: the rest of the course works in the browser either way.

Two more places to use as you go: the Python reference, where every built-in function and string, list and dictionary method has a plain-English page with a runnable example, and 60+ example programs (prime numbers, palindromes, sorting, files…) with full code and output.

If you get stuck

Everyone gets stuck; it is a normal part of programming, not a sign you are bad at it. Read the error message from the bottom line up, re-read the example, change one thing at a time, and use the hints. The playground explains most error messages in plain English.

Check yourself

Quiz

1. Do you need to install anything to start this course?

2. What is the best way to learn from a code example?

Go deeper

📚 Further reading

Trusted, mostly free sources: official documentation, well-known textbooks and courses. When you want to confirm or go deeper on anything here, start with these.

Ready