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: Gabriele Masina (QCB)
Email: gabriele.masina [guess what]
Andrea Ferigo (Data Science)
Email: andrea.ferigo [guess what]
Office hours: Please write an email to arrange a call.
Lecture time: Monday 14.30-16.30 (lab)
Tuesday 15.30-17.30 (lecture)
Wednesday 11.30-13.30 (lab)
Thursday 15.30-17.30 (lecture)
Communications: Please check the moodle page of the course for news and updates.
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.
Slides: TBD Course introduction [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]
Pandas [slides] [handouts]
Numpy+MatPlotLib [slides] [handouts]
Recursion [slides] [handouts]
Programming para­digms [slides] [handouts]
Exercises — 1 [slides] [handouts]
Lab: Lab page (QCB)
Lab page (Data Science)


Modality: Written exam