Programming in Python, Fall 2009 (4 cr), Period I
The course is a voluntary intermediate level course. The teaching is fully in English.News
- New. The final results have arrived. Thank you for your patience. If you have questions about project work grading, contact the corresponding assistant.
- Results of the exam on 24th of November.
- The exam has now been evaluated, results can be found here. See also criteria for questions 1, 2, and 3. Contact the lecturer if you have questions about the exam evaluation.
- Checklist (in intranet) of exercises and two of the exam questions is available. The conversion list from solved exercises to points can be found here.
- Return your project work to the teacher responsible for your topic. See the project page for info.
- Solutions to exercises and discussion about them can be found here. Requires University's password.
- Project topics are now available. See the project section.
- Note that the time and place of the exam has changed.
- For the IRC users: In IRCnet there is a channel #tkt-python for this course.
- There are now 8 exercise groups in total. Transfer yourself from the queue to a group that has room and suits your timetable.
- As the course has proved more popular than expected, new exercise groups will be created soon.
- Registering for the course will begin on Thursday 27 of August through the ILMO system.
Prerequisites
Programming skills in at least one programming language recommended. Basic computer skills (Unix).Lectures
Jarkko Toivonen 08.09.-15.10. Tue 12-14, Thu 10-12 B123Note. On 24th of September the lecture is exceptionally at 8-10 in B123.
Lecture slides
I will add printable handouts later.
Tue 8.9 | Administration Basics part 1 |
Thu 10.9 | Basics part 2 |
Tue 15.9 | Basics part 3 |
Thu 17.9 | Basics part 4 Objects part 1 |
Tue 22.9 | Objects part 2 |
Thu 24.9 | Objects part 3 Exceptions |
Tue 29.9 | Modules File handling, the sys module |
Thu 1.10 | Strings and regular expressions 1 |
Tue 6.10 | Strings and regular expressions 2 |
Thu 8.10 | Documentation and testing NumPy |
Tue 13.10 | Tkinter Example program |
Thu 15.10 | Miscellaneous What's new in Python 3 |
Handouts
Four slides per page
- Administration
- Basics
- Objects
- Exceptions
- Modules
- File handling, the sys module
- Strings and regular expressions
- Documentation and testing
- NumPy
- Tkinter
- Miscellaneous
- What's new in Python 3
Exercise sessions
Note. The exercises will begin already in the first week. First week's exercises will be in a computer class and later exercises in a normal class. Note also the special times on first week in groups 1 and 2.- Lauri Alanko 08.09. Tue 14-16 B221, 14.09.-16.10. Mon 12-14 B119
- Lauri Alanko 08.09. Tue 16-18 B221, 14.09.-16.10. Mon 14-16 B119
- Markus Heinonen 07.09. Mon 14-16 B221, 14.09.-16.10. Mon 14-16 DK117, This group is reserved for MBI students only!
- Markus Heinonen 10.09. Thu 16-18 B221, 14.09.-16.10. Thu 16-18 B222
- Harri Hämäläinen 08.09. Tue 18-20 B221, 14.09.-16.10. Tue 18-20 B119
- Harri Hämäläinen 11.09. Fri 12-14 B221, 14.09.-16.10. Fri 12-14 B119
- Lauri Alanko 10.09. Thu 14-16 B121, 14.09.-16.10. Thu 14-16 CK111
- Harri Hämäläinen 08.09. Tue 14-16 DK110, 14.09.-16.10. Tue 14-16 BK107
Preliminary contents
- Basic concepts of Python
- Data types and variables
- Expressions
- Flow control and functions
- Basic input and output
- Data structures: lists, tuples, sets, dictionaries
- Objects and classes
- Exceptions
- Modules
- String handling
- Regular expressions
- File processing
- Documentation and testing
- Overview of NumPy and TkInter GUI libraries (if time permits)
Course material
The course book is "Python in a Nutshell" [1]. About a dozen copies have been ordered to the faculty library. Additionally, slides shown during lectures will be published here. See also a separate page on external resources.Exam
Note, the date has changed. Course exam (obligatory) is on Wednesday 21th of October at 9-12 in room B123 Tuesday 20th of October at 16-19 in rooms A111 and B123 of Exactum.The exam questions will be both in Finnish and in English, and you can use either language to answer. There will be 3 questions. The first question consists of several small questions. The second question will probably be an algorithmic or programming related question. The third question will be a short essay. The questions (especially the first and the third) will be less like the exercise questions; they test more about the understanding of the different aspects of the language.
The exam will cover the lectures and exercises. The Python 3 part of the lectures will not be required.
Project work
This larger obligatory assignment is worth 20 points. The student is expected to implement a program in clear Python code according to style and recommendations learned during the course. The work should be documented and tested according to normal software practices. Topics for the assignment will be given later. Go to the separate project pageGrading
Exam 20 points + Project work 20 points + Exercises 20 points = 60 points. Grade 1/5 requires ~30 points, grade 5/5 requires ~50 points. The course cannot be passed by a separate exam.Literature
- Alex Martelli, Python in a Nutshell, O'Reilly 2006
- Hans Petter Langtangen, Python Scripting for Computational Science, Springer 2009
- Mark Pilgrim, Dive Into Python, CreateSpace 2004
- Mark Lutz, Learning Python, 3rd Edition , O'Reilly 2008
Jarkko Toivonen