Foundations · Lesson 1/9

Setup & Prerequisites — Your First Notebook

25 min 1 exercise 1 quiz

What you'll set up

Before your first model, you need a kitchen to cook in. In this lesson you will:

  1. Install a code editor (VS Code) — for reading and writing AI code
  2. Install Python on your machine — the language of every lesson ahead
  3. Get a real AI notebook running — the fastest way possible, using Google Colab (or Anaconda if you prefer to work offline)
  4. Create free accounts on Kaggle and Hugging Face — the two communities you'll return to constantly
  5. Run and check a real script — your first working result today

No GPU, no expensive laptop, no prior experience needed. Let's go.

A kitchen, not just a recipe 🍳

AI work looks different from regular programming in one big way: you write code in notebooks, not plain scripts. A notebook is a document made of cells — you write a bit of code in one cell, run just that cell, and see its output immediately right below it, before moving to the next. This "run one small piece, see the result, then continue" rhythm is exactly why AI work feels so hands-on — and it's also exactly the loop this whole roadmap uses.

Three things make up your kitchen:

  • A code editor (VS Code) — for writing and reading code with helpful autocomplete and color-highlighting.
  • Python — installed on your actual machine, the language behind NumPy, pandas, scikit-learn, PyTorch, and everything else you'll touch.
  • A notebook environment — where you'll actually run AI code, cell by cell. You have two options, and you don't have to choose forever:
    • Google Colab — opens in your browser, needs zero installation, and gives you a free GPU (the special hardware that makes training models fast) — the easiest way to start today.
    • Anaconda — installs Python + Jupyter Notebooks + the core AI libraries (NumPy, pandas, scikit-learn, matplotlib) together on your own machine, for when you want to work offline.

Most beginners start with Colab (nothing to install, instant results) and move to a local setup later once they're hooked.

Step 1 — Install a code editor

Download and install Visual Studio Code — free, for Windows, macOS, and Linux.

  1. Click the link, download the installer for your OS, run it, accept the defaults
  2. Open VS Code once installed
  3. From the Extensions panel (the icon with four squares on the left sidebar), search for and install the "Python" extension and the "Jupyter" extension — these let VS Code run notebooks directly, if you ever prefer that over Colab

You now have a real AI development setup.

Step 2 — Install Python on your machine

Go to python.org/downloads and download the latest version.

⚠️ On Windows: tick "Add python.exe to PATH" on the installer's first screen before clicking Install.

Confirm it worked — open a terminal and type:

python --version

Seeing Python 3.12.x (or similar) means you're ready.

Step 3 — Run your first notebook

The fast way (recommended to start):

  1. Go to colab.research.google.com and sign in with any Google account
  2. Click New notebook
  3. Click into the first cell, type print("Hello, AI"), then press Shift + Enter to run it
  4. Watch the output appear right below the cell — that's the notebook rhythm you'll use constantly

That's it — you have a free GPU-backed AI environment with nothing installed.

The offline way (optional, for later): download Anaconda, install it, then open "Jupyter Notebook" from your Start Menu / Applications — it bundles Python with NumPy, pandas, scikit-learn, and matplotlib already included.

Step 4 (optional but recommended) — Join the community

Two free accounts you'll use throughout this roadmap and beyond:

  • Kaggle — free datasets, competitions, and free notebook compute (you'll use it heavily in the Machine Learning and Generative AI lessons)
  • Hugging Face — the world's library of pre-trained AI models you can try or build on directly, no training required

Create both now — free, two minutes each.

Exercise 1

Prove your setup works. This runs right here in your browser — a preview of the notebook rhythm you just set up.

A model was tested 3 times with accuracy scores [0.91, 0.88, 0.95]. Write code that:

  1. Stores the scores in a list called scores
  2. Computes their average into a variable called avg
  3. Prints "Average accuracy: <avg>"

This is your first checked, working AI-flavored result — small, but real.

Quick quiz

Question 1 of 4

What makes a notebook different from a plain script?

Question 2 of 4

Why do many AI beginners start with Google Colab?

Question 3 of 4

What does Anaconda bundle together?

Question 4 of 4

What is Hugging Face mainly used for?

You're ready ✅

Your checklist:

  • [x] Code editor installed (VS Code + Python/Jupyter extensions)
  • [x] Python installed on your machine
  • [x] A real notebook running (Google Colab or Anaconda)
  • [x] Kaggle and Hugging Face accounts created
  • [x] Your first working, checked script ran successfully

Next up: Python for AI — turning that same notebook rhythm toward NumPy, pandas, and real data.

Practice

Reading is not learning until you run something. Pick one.

Open an example in Code Lab