Scientific Programming: Part A - Programming

General information

Degrees: Quantitative and Computational Biology, Data Science
Period: September - October


Computer pro­ces­sing is a key com­po­nent of modern data ana­ly­sis pipe­li­nes, and plays an increa­sin­gly impor­tant role in many fields of scien­ce. The goal of the fir­st part is to intro­du­ce the Python pro­gram­ming lan­gua­ge, one of the most wide­ly used scien­ti­fic com­pu­ting lan­gua­ges, and to a col­lec­tion of libra­ries that can be used to ana­ly­ze data.

At the end of the modu­le, stu­den­ts are expec­ted to:

  • Remember the syn­tax and seman­tics of the Python lan­gua­ge;
  • Understand pro­grams writ­ten by others indi­vi­duals;
  • Analyze a sim­ple data ana­ly­sis task and refor­mu­la­te it as a pro­gram­ming pro­blem;
  • Evaluate which fea­tu­res of the lan­gua­ge (and rela­ted scien­ti­fic libra­ries) can be used to sol­ve the task;
  • Construct a Python pro­gram that appro­pria­te­ly sol­ves the task;
  • Evaluate the results of the program.


Teaching for this course is in synchronous online mode. The details for the connection to the theoretical lectures and the labs are available on the Moodle page of the course.

Course Information

Instructor: Andrea Passerini
Teaching assistants: Luca Bianco (QCB)
Email: luca.bianco [guess what]
David Leoni (Data Science)
Email: david.leoni [guess what]
Tutors: Samuel Valentini (QCB)
Email: samuel.valentini [guess what]
Gabriele Masina (Data Science)
Email: gabriele.masina [guess what]
Office hours: Wednesday 14:30-15:30 (send email before)
Lecture time and place: Monday 14.30-16.30 A107 (Lecture)
Tuesday 15.30-17.30 A107 (Lab. QCB)
Tuesday 15.30-17.30 A103 (Lab. Data Science)
Wednesday 11.30-13.30 A107 (Lecture)
Thursday 15.30-17.30 A107 (Lab. QCB)
Thursday 15.30-17.30 A208 (Lab. Data Science)
Bibliography: Allen Downey, Think python — How to think like a Computer Scientist, Green Tea Press [pdf]
M. Lutz, Learning Python (5th edition), O'REILLY, 2013.
Material: Slides and handouts (pdf format)
Course intro­duc­tion [slides] [handouts]
Introduction to Python [slides] [handouts]
Strings, lists, tuples and dic­tio­na­ries [slides] [handouts]
Complex sta­te­men­ts [slides] [handouts]
Functions [slides] [handouts]
Modules and pro­grams [slides] [handouts]
Recursion [slides] [handouts]
Pandas [slides] [handouts]
Numpy+MatPlotLib [slides] [handouts]
Programming para­digms [slides] [handouts]
Exercises — 1 [slides] [handouts]
Lab: Lab page (QCB)
Lab page (Data Science)


Modality: Written exam