University of Geneva · CUI BSc · Algorithmics & Data Structures
Environment Setup & Python Syntax
Seminar 1
1 / 12
Who We Are
Prof. Katarzyna Wac, Ph.D.
Alexander Horst
2 / 12
Objectives for CUI BSc ALGs
- Introduction to the Python programming language
- Concept of algorithms and data structures for collections
- Search and sorting methods
- Concept of algorithm complexity
- Recursion and divide-and-conquer algorithms
- Tree and graph structures
- Number representation and numerical algorithms
- Problem complexity, NP-complete and undecidable problems
3 / 12
Building Blocks
Note: lectures do not explain one-to-one the seminar content. Lectures provide the context of the algorithm and data management.
4 / 12
Grades
- 70% — written exam (180 min)
- Closed-book, written by hand on paper
- Seminar-content only (Algorithmics AND Python)
- Half is multiple-choice with deduction, half is open-ended questions
- Minor syntax errors overlooked if meaning remains clear
- Questions in English and French — answers can be in either
- 30% — graded Project + peer-review submission
- Your code: pushed to GitLab by 19 May 2026 23:59
- Peer-review: completed by 31 May 2026 23:59
5 / 12
Student Project (30% of grade)
- Goal: learn algorithmics by working on a single, real dataset
- Dataset: step-activity data from 12 real Withings ScanWatch users
- Apply course algorithms — sorting, searching, DP, graphs — to the data
- Justify every algorithmic choice in your README
- Optional: connect your own smartphone via the Withings App and analyse your own data
- Deliverables (details in Seminar 4):
- Code repo + README explaining your algorithms (15% of final grade)
- Peer review of one randomly assigned colleague's code (15% of final grade)
6 / 12
Schedule
Note: this is not a Python course — we cover the minimum to go deeper into algorithmics. You can skip the first 3 weeks if you are comfortable in Python, but we suggest you do at least the exercises as the material will be relevant for the exam.
7 / 12
Why Learning Python?
[tiobe.com/tiobe-index]
- Simplicity: readable, one-line Hello World
- Relevance #1 language (TIOBE Index)
- Versatile: data science, backend, scripting
- Same algorithmic concepts as C/Java, cleaner syntax
8 / 12
Seminar Playbook
- Help each other: collaboration and discussion are encouraged
- Talking is allowed: this is a workshop, not a lecture hall
- ChatGPT is allowed: but question its output, never copy blindly
- Understand every line before you use it
- Questions during class? ask anytime
- Questions outside class? email me
- Exercises are your exam prep — treat them seriously
- Coming is optional: but we'll be glad to see you here especially from week 4 onwards (project and algorithmics)!
9 / 12
Today's Focus
- By the end of today, you will be able to:
- Set up and use a virtual environment (venv)
- Work with Python's core types and convert between them
- Use f-strings for modern string formatting
- Apply PEP-8 coding style conventions
- Use basic Git commands to version-control your work
10 / 12
Today's Exercises
- Ex 1 — Greeting script: ask name & age, compute birth year
- Ex 2 — Fix 11 PEP-8 violations in a provided snippet
- Ex 3 — Type conversions: parse input, cast between int / float / str
11 / 12
University of Geneva · CUI BSc · Algorithmics & Data Structures
Thank You & Have Fun!
12 / 12