Version 48 (modified by 4 years ago) ( diff ) | ,
---|
Programming in Python (for quantitative biologists)
Learning objectives and expected learning outcomes
The course introduces students to imperative programming by referring to the Python language.
The course is divided in two parts:
- Python and its object-oriented features;
- Python libraries that can be useful in scientific computation and data analysis, in particular NumPy and pandas.
Students will acquire the ability to write and tune a program that automatizes simple computational tasks; they will be able to understand how a small piece of Python code works, to find the reasons of a malfunction and to correct it appropriately. Moreover, students will be able to use the NumPy and pandas library to analyze tabular data.
A.A. 2020/21
The course will take place in the second semester. If pandemic restrictions persist, lectures will be mainly streamed (with synchronous interaction with the instructors via MS Teams); streamed videos will be available until the conclusion of the course. Some lesson could be registered in asynchronous form. Laboratory exercises will conducted autonomously by the students and special synchronous feedback sessions will be organized.
As long as local regulations permit it, the lab part of the course will be held "on site": recordings will be available, but, please attend if you can, since lab coaching is much more effective with face-to-face interactions. The currently planned schedule (date format is day/month) is:
Lessons (40h) | Mo 1/3, Fr 5/3, Mo 8/3 | Fr 12/3 | Mo 15/3 Fr 19/3 | Mo 22/3, Fr 26/3, Mo 29/3 Fr 9/4 | Mo 12/4, Fr 16/4, Mo 19/4 | Mo 26/4, | Mo 10/5, Fr 14/5, Mo 17/5 | Mo 24/5, Fr 28/5, Mo 31/5 | Mo 7/6 |
---|---|---|---|---|---|---|---|---|---|
Labs, Room DELTA (16h) | | | | Fr 23/4 | Fr 30/4, Fr 7/5 | Fr 21/5 | Fr 4/6 | Fr 11/6 | |
Setup | Scaffolded | Plain Python interpreter | Notebooks |
Please answer to this survey.
During these hard times of physical distance it is important to keep a social proximity: subscribe to the forum on Zulip (use an @studenti.unimi.it
email).
Syllabus
- The Python programming language.
- Native data types.
- Functions, selections and iterations.
- Basic data structures: lists, tuples, dictionaries.
- Object-oriented encapsulation.
- Iterators and generators.
- Files.
- Numpy multi-dimensional arrays and matrices.
- Data manipulation and analysis with pandas.
Any Python3 book can be used to support the learning of the general part, for example J. Hunt "A Beginners Guide to Python 3 Programming" (The electronic version is free for Unimi students). NumPy and pandas have excellent online documentation.
The examination is based on laboratory exercises. A final mark (on a 30 point scale) is given, by taking into account the knowledge of the subject and tools, and the clarity of the solutions.
-
Programming in Python (for quantitative biologists)
- Learning objectives and expected learning outcomes
-
A.A. 2020/21
- Syllabus
- 1. March 1, 2021, 9:30-11:30 am
- 2. March 5, 2021, 9:30-11:30 am
- 3. March 8, 2021, 9:30-11:30 am
- 4. March 12, 2021, 9:30-11:30 am
- 5. March 15, 2021, 9:30-11:30 am
- 6. March 19, 2021, 9:30-11:30 am
- 7. March 22, 2021, 9:30-11:30 am
- 8. March 26, 2021, 9:30-11:30 am
- 9. March 29, 2021, 9:30-11:30 am
- 10. April 9, 2021, 9:30-11:30 am
- 11. April 12, 2021, 9:30-11:30 am
- 12. April 16, 2021, 9:30-11:30 am
- 13. April 19, 2021, 9:30-11:30 am
- 14. April 23, 2021, 9:30-11:30 am
- 15. April 26, 2021, 9:30-11:30 am
- 16. April 23, 2021, 9:30-11:30 am
1. March 1, 2021, 9:30-11:30 am
2. March 5, 2021, 9:30-11:30 am
3. March 8, 2021, 9:30-11:30 am
4. March 12, 2021, 9:30-11:30 am
- Slides -- Slides (printing version)
- Video recording
- Homework: One triangle
5. March 15, 2021, 9:30-11:30 am
- Slides -- Slides (printing version)
- Video recording
- Homework: Triangle kinds DNA Hamming Newton sqrt
6. March 19, 2021, 9:30-11:30 am
- Slides -- Slides (printing version)
- Video recording
- Homework: Pythagorean triplets Flatten list
7. March 22, 2021, 9:30-11:30 am
- Slides -- Slides (printing version)
- Video recording
- Homework: DNA files
8. March 26, 2021, 9:30-11:30 am
- Slides -- Slides (printing version)
- Video recording Unfortunately the first ~15' are missing:
- for consolidating the basics I was suggesting CS Circles
- a book on Python (the one suggested above, there are many suggested also on CS Circles)
- you can find tons of additional exercises if you want: Exercism
- Homework: DNA forensics
- Optional, provided by GitHub to familiarize with GitHub Classroom (I tried it today: nothing special, but it gives you many links if you want to learn more about github)
9. March 29, 2021, 9:30-11:30 am
- Slides -- Slides (printing version)
- Video recording
- No new homework, but try to finish all the assignments; if you still feel insecure on Python basics, I'm preparing some AssignmentsOnTheBasics.
10. April 9, 2021, 9:30-11:30 am
- Slides -- Slides (printing version)
- Video recording
- No new homework, but try to finish all the assignments; if you still feel insecure on Python basics, I'm preparing some AssignmentsOnTheBasics.
11. April 12, 2021, 9:30-11:30 am
- Slides -- Slides (printing version)
- Video recording
- Homework: NumPy basics
12. April 16, 2021, 9:30-11:30 am
13. April 19, 2021, 9:30-11:30 am
- Slides -- Slides (printing version)
- Video recording.
- Homework: Life
14. April 23, 2021, 9:30-11:30 am
Room DELTA, MS Teams YouTube
15. April 26, 2021, 9:30-11:30 am
16. April 23, 2021, 9:30-11:30 am
Room DELTA, MS Teams YouTube