Open workspace
Python 1.1Concept5 min4 parts

Why Python?

Say what Python is and why it is used for AI and machine learning, and know where Python code is written and run.

Loading your progress…Next: 1.2 Run Your First Python Code

In this lesson4 parts

  1. 01What Python is: high level, general purpose and interpreted
  2. 02Why Python for machine learning: NumPy, pandas, Matplotlib, scikit-learn, TensorFlow and PyTorch
  3. 03Jupyter notebooks and Google Colab
  4. 04Recap and your first challenge

Key terms

The words this lesson introduces, each in one line. The module’s glossary collects them all.

programming language
precise rules for writing instructions a computer can carry out
interpreted
the interpreter executes code one statement at a time
library
published code your program can import and use
notebook · cell
a document made of cells; a code cell holds Python, a text cell holds notes

Quiz 5 questions

Answer each one in your head, or on paper, before you check it. Getting one wrong here is how the lesson sticks.

  1. 01

    Python code is executed one statement at a time by a program. What is that program called?

  2. 02

    Which library would you use for tables of data: NumPy, pandas or Matplotlib?

  3. 03

    An online tutorial writes print "hello". Why does it fail in Colab?

  4. 04

    What does a text cell in a notebook hold?

  5. 05

    Where does the code in a Colab notebook run?

Practice

Problems to solve in your own notebook. Each states the problem, not the steps: working out the steps is the exercise. Level A applies the lesson, B combines it with earlier ones, C stretches it.

The self-checking notebook for this lesson is Notebook 1 · Getting Started.

Common mistakes

What you will see when it goes wrong, why it happens, and the fix.

Where it’s used

Where this lesson’s ideas turn up in real work.