# Informatics 2 syllabus Contemporary usage of Python 4 SWS, 5 ECTS, in degree program {abbr}`LSI (Life Science Informatics)` Master and {abbr}`ICS (International Computer Science)` ## Intended learning outcomes The purpose of the course is for you (the student) to learn to: Professional competences: - outline fundamental features of the Python programming language - understand the advantages of object-oriented and functional programming - know different request types to access web resources - list useful libraries from the standard library Methodological competences: - implement programs for string processing - leverage the interactive interpreter for short computing tasks - use object-oriented programming to breakdown a program into classes - use functional programming to write shorter code - implement programs for interacting with web APIs - carry out simple image processing tasks - leverage Numpy to conveniently work with matrices - use an unknown library by reading its documentation Social competences - cooperate in a pair programming setting - evaluate someone else's work and give constructive feedback (e.g., in context of peer-assessed exercises) ## Prerequisites - Computer science fundamentals (e.g., information, hardware, software, operating systems, shells, algorithms) - Fundamental programming tools (e.g, control flow, data structures, functions) ## Content (what we do to reach the learning outcomes) Most of the contents are based on the course [CS41: The Python Programming Language](https://stanfordpython.com) from Stanford University. - Python basics: - Interactive interpreter - Comments - Variables and types - Numbers and Booleans - Strings and lists - Console I/O - Control Flow - Loops - Functions - Assignment Expressions - Data structures: - `list` - `dict` - `tuple` - `set` - Object-oriented Python: - errors and exceptions - *easier to ask for forgiveness than permission* (EAFP) vs *look before you leap* (LBYL) - data model - classes - exceptions as classes - Functions: - namespaces and scope - Python Functions - (variadic) arguments - Parameter ordering - Functional programming: - meaning - first-class functions - `lambda`s - iterators and generators - `map` and `filter` - decorators - Python & the Web: - HTTP - requests library - working with images - creating a web interface for your app using Flask library - Numpy: - what is a matrix? - why are matrices useful? - n-dimensional array `ndarray` - axes and shapes - matrix operations - statistical methods - parameter fitting example - Standard library and third-party libraries ## Didactic methods To reach the learning outcomes we will use the following didactic methods: - [Flipped classroom](https://en.wikipedia.org/wiki/Flipped_classroom) - Labs with feedback sessions - [Pair programming](https://en.wikipedia.org/wiki/Pair_programming) ## Grading Written exam 90 min. The examination is based on the intended learning outcomes. ## Materials - Lecture videos in THD's Moodle - alternatively: [Stanfordpython course reader](https://github.com/stanfordpython/course-reader) - [Slides that accompany the videos](https://mygit.th-deg.de/lsi/inf2-notes/-/jobs/artifacts/master/browse?job=build). These are tailored for discussions during the class. - Exercise notebooks in THD's Moodle - Previous Exams - [Instructor versions](https://mygit.th-deg.de/lsi/nbgrader-notebooks/inf2-exams-source) - [Student versions](https://mygit.th-deg.de/lsi/nbgrader-notebooks/-/jobs/artifacts/main/browse/inf2-exams-release?job=build) Additional: - [The Python Tutorial](https://docs.python.org/3/tutorial) ## Time & Room This course takes place only in summer semester. For time and room refer to [Thabella LSI-2](https://thabella.th-deg.de/thabella/opn/pdf/page/LSI-2).