Introduction to Python and the Course Environment

This session introduces Python and the environment you will be working in for the rest of the term.

It begins with what Python is and why it became the default language of analytics and data science — readable syntax, an interactive workflow, and a large ecosystem of data libraries — and then builds the mental model underneath that experience: an interpreter that evaluates one expression at a time, in a read-evaluate-print cycle that is what makes a notebook feel conversational. From there comes the distinction that shapes the whole course, between a notebook (an ordered collection of cells with saved output, meant for exploration) and a script (a file executed start to finish, meant for repeatable work), and why the course starts with the former and moves deliberately toward the latter. Variables are introduced as names bound to values rather than boxes holding them, along with the idea that clear naming is part of correctness rather than decoration.

The hands-on half covers course logistics, tools, and the submission workflow, then turns to Jupyter itself: creating a notebook, the difference between code cells and markdown cells, how execution order and the execution counter reveal the notebook’s hidden state, and how print differs from the automatic display of a cell’s last expression. The in-class activity is a guided notebook combining arithmetic, strings, and variable assignment, saved and named according to the course convention; the homework is notebook setup and basic Python expressions.

Figure: Infrographic that summarizes the content of this session

Listen

Python Logic and the Literal Machine

Presentation

Read