Lectures
Übertragungsraum / transmission room Y27H35/36 Seats: 36
Exercises
Online Exercise submissionThe exercise classes have two goals:
1) Discussion of solutions of past exercises,
2) On site problem solving under the supervision of the TAs.
Attendance is strongly recomended!
Archiv
FAQ
Details
For further information please contact: Daniela Portillo del Valle
I. General description
This course is a basic introduction to Python. The following topics will be covered:
- Basic notions: computer, algorithms, programming languages
- Introduction to Python and Visual Studio, interpreter and scripts
- Basic data types (Numbers, booleans, strings and lists)
- Control flow (if, for and while)
- Functions
- Modules, Packages
- Numpy
- Matplotlib
- Advanced data types (tuples, dictionaries and classes)
- Input/output
Please bring your own computer with you in all the lectures. To run Python scripts, you will be free to use the IDE you want or to work directly from shell, although for homework submission ONLY .py and .pdf files will be accepted. In the lessons, Visual Studio Code will be the adopted IDE, we recommend you use it as well if you have no experience in programming.
If you want to work locally on your computer make sure to install Python3, Visual Studio Code (if you use this IDE), pip, numpy and matplotlib (see procedure below). In your thinlinc account they should be already installed.
II. Installation procedure
If you want to use your own laptop, please follow this procedure to install Python3, VSCode, pip, numpy and matplotlib:
-
Install Python3, last version 3.12.6: https://www.python.org/downloads/
-
Install Visual Studio Code: https://code.visualstudio.com/
-
Open Visual Studio Code and download the extension Python Intellisense (Code -> Preferences -> Extension)
-
Select the Python3 interpreter in Visual Studio Code (check that it is the Python3 executable that was installed in step 1)
-
Install pip: https://pip.pypa.io/en/stable/installation/ (useful to easily install packages)
-
Install numpy (use pip): https://numpy.org/install/
-
Install matplotlib (use pip): https://matplotlib.org/stable/users/installing/index.html
If you want to use Thinlinc, see the information here: https://tl.math.uzh.ch/.
III. Course material
- Slides, example files,
- Python Tutorial, Guido van Rossum and the Python development team:
https://docs.python.org/3/tutorial/
https://bugs.python.org/file47781/Tutorial_EDIT.pdf
IV. Exercises
A worksheet will be uploaded every Friday afternoon on the website. The submission of exercise solutions is VOLUNTARY. The deadline for submission is on Mondays (10 days after) at 8:00 a.m.
**ONLY .py and .pdf files are accepted for submission. See the solution template for scripts in "Downloads".
The first exercise sheet (worksheet 0) will not be corrected, it will be dedicated to set up your python environment and VScode, and very basic exercises to check that everything works properly.
The exercise classes have two goals: 1) Discussion of solutions of past exercises, 2) On site problem solving under the supervision of the TAs. Attendance is strongly recomended!
