Anastassia's obsession: my initial motivation to learn Python was to build a program that would play Mastermind with me. What is yours?
Welcome to this self-paced Python course! It is based on the autumn 2023 course Introduction to Data Science and Programming which we held at ITU together with Michael Szell. If you're here, chances are high that you want to learn Python. That's a great idea! Let's get started right away.
Click on the "Code" button in the upper right corner of this page, and then select "Download ZIP". (Or, if you're familiar with Git, just git clone
this repository.)
The Python course consists of 10 units. Each unit has a lecture (see folder lectures
) and an exercise (see folder exercises
). To complete a unit,
- first look through the lecture (slides/notebooks and video recording), and
- then try to solve the corresponding exercise yourself.
You can skip lecture 01, as it mainly contains organizational material for the ITU course -- go straight to exercise 01. From lecture 02 onwards, each lecture has a Jupyter notebook; some lectures also have additional material (slides, data, Python scripts).
The lecture notebooks are self-explanatory and self-contained. In addition, video recordings for each of the lectures are available via Dropbox share upon request. Please send me an email to get the link.
Exercise 01 is all about installing the necessary software for this course. Optionally, we also recommend that you install Visual Studo Code and the Sublime Text editor.
From exercise 02 onwards, you will find 2 versions of each exercise notebook: exerciseXX
and exerciseXX_solved
. Start with exerciseXX
, and give yourself a couple of hours (and plenty of tries!) to solve the exercises on your own, before you check out the exerciseXX_solved
notebook.
If you want to test yourself, or to practice more, you can also do the assignments (see the folder assignments
). They contain tasks that are a bit more complicated than those in the exercises, and require a bit longer time to solve. In order to solve the assignments, you first need to go through a certain amount of units:
- Assignment 01: doable after units 01-04
- Assignment 02: doable after units 01-06
- Assignment 03: doable after units 01-08
- Assignment 04: doable after units 01-10
In the folder books
, you will find the PDF versions of 2 books: "Python Crash Course" by Eric Matthes, and "Python Projects For Beginners" by Connor Milliken. Both books are great to look up any of the topics from this Python course. If you are struggling with a topic or want a more in-depth explanation, make sure to check it out in both books!
After completing the course, you will be familiar and comfortable with the following topics:
- Working with Jupyter notebook
- Python objects (the "building blocks" of Python)
- Fundamental data types:
int
,float
,str
,bool
, further data types and how to work with them:list
,set
,dict
,tuple
- Operators (mathematical, assignment, comparison)
- Boolean logic and operations
- Conditional statements (if/else/elif)
- Loops:
for
andwhile
- Writing your own functions
- Running Python scripts from the command line interface (CLI)
- Creating interactive Python scripts with user input
- Reading in and processing data in different file formats
- Importing, using, and creating Python modules
- Installing, importing, and using Python packages and libraries
- Data wrangling with
pandas
- Package management from the command line with
conda
- Measuring the runtime of your code
- Sending HTTP requests with
requests
and webscraping withbeautifulsoup4
Done with the 10 units?
- Take a look at the recap (see
recap
folder) - Check out the full Introduction to Data Science and Programming course, starting from Unit 11.
- Happy coding!
Use the Discussions section on this page to:
- ask specific questions (Q&A)
- suggest and propose stuff (Ideas)
- complain, comment, be opinionated (General) ... or get in touch with me by email.