Subject description
The course consists of the following chapters:
- Expressions, basic data types, variables. Working in Jupyter notebook. Program as a sequence of instructions.
- Files. Loops and conditional expressions
- Basic methods of strings.
- Dictionaries
- Lists
- Function definitions.
- Other data types in Python
- Advanced topics in working with strings and files
- List, set and dict comprehension, generators.
- Numpy library
- Matplotlib library
- Reading and writing of several common formats like json, xml, pickle, xlsx.
- Reading unstructured data (regular expressions HTML)
- Additional topics
The subject is taught in programs
Objectives and competences
The subject is conceived as a "minor" course, focused on students who will not continue their careers as professional programmers, but will use their programming knowledge to automate simple tasks, process data, and similar activities. However, the approach is still systematic and rigorous enough to provide a suitable foundation for potential further education in programming.
Teaching and learning methods
Traditional lectures with a continual presentation of a large number of examples on the computer, with exercises focusing on solving a large number of smaller programming tasks, typical for specific topics. The exercises are conducted on computers with the assistance of teachers and demonstrators, and solutions are submitted through the Moodle system.
For increased motivation, students, for example, quickly learn how to read files so they can work with more realistic cases. The examples are chosen to align with topics from interdisciplinary studies, such as text processing (digital linguistics), reading various file formats (multimedia), processing tabular data (administrative informatics), and topics from areas relevant to students who choose the course as an interdisciplinary subject.
Expected study results
Knowledge and Understanding:
Familiarity with basic programming constructs (variables, statements, loops, subprograms, etc.) and their effective use in solving programming problems.
Application:
The student is able to use the Python programming language with associated libraries for automating simple processes, as well as, for example, capturing, processing, and presenting data.
Reflection:
Learning the basics of algorithmic thinking and coding.
Transferable Skills – not limited to one subject:
Students are able to switch to a different programming language if needed. The course can serve as a foundation for further courses in programming and algorithms.
Basic sources and literature
- M. L. Hetland: Beginning Python: From Novice to Professional, Apres 2017.
- Spletna dokumentacija za jezik Python in pripadajoče knjižnice, ter knjižnice numpy in matplotlib.
- Obsežni zapiski predmeta na spletni učilnici (https://ucilnica.fri.uni-lj.si/pn) oz. na githubu (https://github.com/janezd/predavanja/tree/master/pn/predavanja).