Skip to content

Google Colab - Beginner Guide

If this is your first time using Google Colab, follow these steps.

1. Make your own copy (IMPORTANT)

As soon as the notebook opens, go to:

File → Save a copy in Drive

This creates your own version of the notebook. You will be the owner of the copy and you can edit and run everything safely.

2. Understanding cells

A notebook is made of blocks called cells:

  • Text cells - explanations and instructions
  • Code cells - gray boxes with Python code

Each cell can be edited or executed independently.

3. Running code

To run a code cell:

  • Click on the cell
  • Press Shift + Enter, or
  • Click the ▶️ icon on the left side

Always run cells from top to bottom, since some cells depend on earlier ones.

4. Editing code

Some code cells are designed for you to modify as part of the exercise. In those cells, you may:

  • type code where indicated
  • modify existing lines
  • experiment by changing values

If something doesn't work, don't worry - that's part of the learning process.

5. Restarting the notebook (if something breaks)

If execution order gets mixed up or a variable becomes incorrect, you can reset everything:

Runtime → Restart session

Then run the cells again from the top.

6. Safety note about permissions

Sometimes you may see a Google message: "This notebook was not authored by Google."

This is a generic Colab warning for notebooks created by users - it does not mean the notebook is unsafe.

Safety checklist:

  • Prefer to File → Save a copy in Drive before running (recommended).
  • Do not run cells that request Google Drive access (e.g., drive.mount(...)) unless you understand why.

If unsure, save a copy and ask.

You're ready!

After saving your own copy, running cells in order, and knowing how to restart, you can now use the Colab notebook safely and confidently.