Introduction to Python

How this course works, what the notebook can do, and the chapter list.

This is a full introduction to Python for the Swiftener Notebook — a light cell notebook that runs in your browser. You do not install Python. Code stays in this tab.

Goal

Finish every chapter by running the copy-paste cells in the notebook. The last chapter is a small gradebook you can reuse.

How to take the course

  1. Keep this tutorial tab and the Notebook side by side.
  2. Wait until the status is no longer “Loading Python…”.
  3. Click + Code, paste an exercise as the whole cell, then press Shift+Enter.
  4. Read the output under the cell. The last expression of a cell is shown automatically; use print(...) for everything else.

Each shaded block is a complete cell — it does not rely on leftover variables. You can also download This chapter .ipynb from the banner and use Import .ipynb.

This is not the Pandas editor (that uses Ctrl+Enter). This notebook uses Shift+Enter.

What this notebook can and cannot do

  • Can: Python 3, print, last-expression display, numpy, pandas, matplotlib (plt.show()), CSV/text uploads, export .ipynb.
  • Cannot: input(), installing extra packages, fetching URLs, or embedding this tutorial inside the notebook.
  • Do not paste pandas DataFrame lessons here — that is the pandas course.

Sample files

Download from the banner, then in the notebook click Add files:

  • notes.txt — a few lines of text for the Files chapter
  • scores.csv — names and scores for Practice

Chapter list

Work in order the first time. After that, jump around from the sidebar.