Principles of Computer Science - 2016/2017

This course is part of the Bioinformatics program at Sapienza University of Rome. The topics covered in this course include: introduction to programming, Python 2.7, its standard library, and its use in the analysis of data.



  • Monday 9:00-12:00 (Psicologia A, CU026)
  • Wednesday 9:00-11:00 (Psicologia A, CU026)

Useful Links

  • Please subscribe to our mailing list (using your institutional email address to receive the lecture notes, to ask questions, to read answers, and to get news about the course.
  • Download Canopy, a software package containing Python 2.7 and a number of its libraries.



Homeworks will be given during the course - these homeworks will consist of several program-writing exercises.

If a student gets a sufficient score on the homeworks, he or she will be allowed to only do the oral exam in January or February.

If a student does not get a sufficient score on the homeworks, or if a student does not pass the oral exam in January or February, he or she will have to do both a written and an oral exam.


Please register for the exam of Feb 17th through the following form, before February 14th. The written exam (for those that ask to do it) will take place on Feb 17th at 10:00 in the classroom where lectures were given. The oral exam (for all the students) will take place on Feb 17th at 15:00 in Viale Regina Elena, 295b (Palazzina G - Second Floor - Room G29).

Please note that if you ask to do the written exam, you irreversibly lose the homework score you have obtained.


The final homework grades have been published.

The grades of the second homework have been published.

The grades of the first homework have been published.

Ethical Code

All the students have to follow a simple ethical code:

  • copying is forbidden,
  • homeworks' solutions have to be written autonomously, and must not be shown to other student.
On the other hand, students are encouraged to discuss approaches for solving the exercises.

The teachers will analyze all the homeworks that will be submitted, and will strongly penalize plagiarism.


  • October 3rd: Computers and Programming; First Steps in Python
  • October 5th: Laboratory (Exercises)
  • October 10th: Sequences and Iterations; Boolean Expressions and Conditional Statements
  • October 12th: Laboratory (Exercises)
  • October 17th: Recap; Objects and Methods
  • October 19th: Laboratory (Exercises)
  • October 24th: Methods, Slices, (Im)mutable Objects, Strings
  • October 26th: Laboratory (Exercises)
  • October 31st: Class Cancelled
  • November 2nd: Laboratory (Exercises)
  • November 7th: Strings, Files
  • November 9th: Laboratory (Exercises)
  • November 14th: Dictionaries, Sets
  • November 16th: Laboratory (Exercises)
  • November 21st: Arrays, Images
  • November 23rd: Laboratory (Exercises)
  • November 28th: More on Functions and Loops, and Classes
  • November 30th: Laboratory
  • December 5th: Relational Databases, SQL, Trees, Recursion
  • December 7th: Laboratory (Exercises)
  • December 12th: HTML, GUI
  • December 14th: Laboratory
  • December 19th: Interactive Graphics
  • Homework 1 Solutions
  • Homework 2 Solutions
  • Exam Solutions