UNIL — Université de LausanneHEC Lausanne Autumn semester 2026

Data Science and Advanced Programming

A first programming course for the AI era. No prior experience assumed.

Meets

Mondays, from 14 September

12:30–16:00 · Internef 263 · no class 21 September (holiday); make-up Tuesday 29 September, 10:15–14:00

Grading

Midterm ⅓ · Final exam ⅔

Both on Moodle, in person, proctored

Practice

Optional, ungraded

Weekly workshops; nothing to hand in

Compute

Nuvolos cloud workspaces

Free for enrolled students — nothing to install

Nuvolos
Your workspace runs on Nuvolos.VS Code in the browser — nothing to install. Log in with the email you use for Moodle. Enrolment is closed: if you are registered for the course and cannot get in, write to the teaching assistants.

Schedule

Materials for each session appear below after the Monday it is taught.

#DateSessionPartMaterials
01Sep 14Your first program, and the machine underneathWorkshop: open the editor, make a file, run it — with the play buttonPythonSlides·PDF·Workshop

What a program is, and what happens when you run one. Files and folders. The editor, and the three parts of it you need. Your first error, and how to read it.

Workshop

Open the editor, make a file, type a one-line program, run it. Then four small programs and one error on purpose. No terminal, no commands to type — you use the play button.

Bring

A charged laptop, and your Nuvolos enrolment done before you arrive.

02Sep 28Values, names, and expressionsWorkshop: read-and-predict in Wooclap, then small programs to writePythonSlides·PDF·Questions·Solutions

What values are, what their types allow, and why the computer's arithmetic sometimes surprises us: str, int, float, bool and None; names and assignment; the arithmetic operators and their order; floats and money; converting between types; reading an error.

Workshop

Short read-and-predict questions in Wooclap, then small programs to write on the same ledger. Optional extra practice for home.

Go further (optional)

03Tue Sep 29Lists, loops, and decisionsWorkshop: read-and-predict in Wooclap, then small programs to writePythonSlides·PDF·Questions·Solutions

Tuesday 29 September, 10:15–14:00, Internef 263 — the make-up for 21 September.

Many values under one name, work that repeats, and programs that choose: lists, indexing and slicing; for and while loops; if, elif and else; dictionaries.

Workshop

Short read-and-predict questions in Wooclap, then small programs to write on the same ledger. Optional extra practice for home.

Go further (optional)

04Oct 5Functions, methods and modulesWorkshop: read-and-predict in Wooclap, then small programs to writePythonSlides·PDF·Questions·Solutions

Calling functions and writing your own: def, return and None, returning several values as a tuple. Signatures and arguments: positional, keyword, defaults. Scope, and why a function can change your list but not your number (mutable and immutable). Methods, and which ones change their object. Modules and import: the standard library, random and seeds. Classes and objects: numpy arrays and DataFrames are objects too, and you write a small class with __init__ and self.

Workshop

Read-and-predict in Wooclap: print is not return, two variables called total, a function that changes your list, the weight that lies. Then functions to write for the ledger: position values and a total, a fee with defaults, years to reach a target, a new method for Position.

Go further (optional)

05Oct 12Reading data codeWorkshop: read-and-predict in Wooclap, then small programs to writePythonSlides·PDF·Slicing in pictures

Nested data, one-line loops, and the two libraries all data science in Python is built on: data inside data, comprehensions, lambda, numpy arrays, and pandas tables.

Workshop

Short read-and-predict questions in Wooclap, then small programs to write on the same ledger. Optional extra practice for home.

06Oct 19Files in, files outWorkshop: read ledger.csv, write report.txt — the whole pipelinePython—

The working directory; reading and writing files; CSV; a complete load → compute → write script; try/except at reading level; environments as a concept; the AI harness, driven.

Workshop

Read ledger.csv, write report.txt — the whole pipeline.

07Oct 26Review and mock midtermPython—

No new material. Sessions 1–6 revisited through the kind of questions the midterm asks: what does this print, which line is the bug, is this output plausible. A mock midterm, taken in class and discussed.

08Nov 2Midterm — written, in classExamproctored, no devices

Written, multiple choice, in class, proctored — no documents or devices. Covers sessions 1–6: what does this print, which line is the bug, is this output plausible. Corrected for guessing (see Assessment).

09Nov 9Data science IData science—

Data-science program announced at semester start.

10Nov 16Data science IIData science—

Data-science program announced at semester start.

11Nov 23Data science IIIData science—

Data-science program announced at semester start.

12Nov 30Data science IVData science—

Data-science program announced at semester start.

13Dec 7Data science VData science—

Data-science program announced at semester start.

14Dec 14Data science VI — wrap-up and mock finalData science—

Data-science program announced at semester start.

—JanFinal exam — written, exam sessionExamdate set by the faculty

Sessions 9–14: detailed data-science program announced at semester start.

How workshops work

Lectures teach the language. In every workshop you run the same six steps, with an AI assistant of your choice:

  1. Framesay what you want, in plain words
  2. Askgive that brief to your AI assistant
  3. Runrun what it wrote
  4. Readfind the lines that do the real work
  5. Judgedecide whether to believe the output
  6. Keepcommit what works

Grading

Midterm1/3Nov 2, written, multiple choice
Final exam2/3exam session, written, multiple choice

Details, scoring rules, and the binding study-plan terms: Assessment.

Teaching team

Pavel IevlevLecturerpavel.ievlev@unil.chLectures, and the exams.
Anna SmirnovaTeaching assistantanna.smirnova@unil.chWorkshops and materials.
Jinran WangTeaching assistantjinran.wang@unil.ch
Clémence ChoukrounTeaching assistantclemence.choukroun@unil.ch

Questions about the course go to the teaching assistants first. Questions about your registration or your grade record go to the Master's office, not to us.