Programming Basics (Python)
Study Course Implementer
SZF, Kuldigas Street 9C, szf@rsu.lv
About Study Course
Objective
The purpose of the study course is to provide comprehensive knowledge of Python programming as a universal tool for data processing and automation of daily workflows.
The study process learns both the technical basis of the language, including the principles of control structure, data structure and object oriented programming, and its diverse practical application, including automated collection of information from Internet resources, data visualisation and the creation of interactive solutions.
By integrating tools for generative AI, the course prepares students not only to quickly transform ideas into functional digital solutions, but also to critically evaluate development methods and make decisions about the most appropriate architecture for the program.
Preliminary Knowledge
To successfully complete this course, students must have basic skills on their computer, including managing files and folders, and navigating basic operating system and Internet browser functions. Logical thinking and understanding the fundamentals of arithmetic will be helpful. With much of the programming documentation, tools and learning resources available in English, English literacy is essential for successful substance learning. No prior programming experience is required because the course is intended for basic learning.
Learning Outcomes
Knowledge
1.Explain basic elements, syntax, and algorithmic logic of Python programming language. • Independent work and tests: • Online tests (tests 1-3); theoretical test of part 1.
Homework (tasks 1-6) • theoretical test of part 1 • Set of online tests (classes 1-6)
2.Describe the role of different data structures (lists, dictionaries), functions, and object oriented programming (OOP) in the code organization. • Independent work and tests: • Online tests (tests 4-6); theoretical test of part 1.
3.Understand the role of version control (Git), code quality standards, and AI tools in modern software development. • Independent work and tests: • Homework (version control (GIT)).
4.Know the libraries and methods needed to analyze data, automate processes, and create simple web applications. • Independent work and tests: • Final Paper development; homework.
Skills
1.Write structured Python code by applying control structures, functions, and objects to implement algorithms. • Independent work and tests: • theoretical examination of part 1; homework.
Final Paper development • Presentation and advocacy of practical work
2.Use version control systems and AI assistants in code writing, error correction, and optimization. • Independent work and tests: • Homework; Final Paper development.
3.Load, clean, and visualize data, and get data from web resources (APIs). • Independent work and tests: • Homework (data processing, web data acquisition, API and NLP); final Paper development.
4.Develop automation scripts for administrative tasks (Excel, PDF) and create simple web interfaces. • Independent work and tests: • Homework (Administrative Automation, Web Apps); Final Paper Development.
Competences
1.1. Independently identify and apply appropriate Python libraries and programming approaches to solve real problems. • Independent work and tests: • Developing the final Paper; presenting and defending the practical work.
2.Analyze workflows and create automated solutions that replace manual data processing and administrative work. • Independent work and tests: • Homework: Administrative automation; Final Paper development.
3.Critically evaluate code quality and AI-generated solutions, ensuring sustainable and secure software development. • Independent work and tests: • Presentation and defence of practical work (code understanding, real-time modification); theoretical test of part 1 (without AI aids).
Assessment
Individual work
|
Title
|
% from total grade
|
Grade
|
|---|---|---|
|
1.
Homework (tasks 1-6) |
25.00% from total grade
|
10 points
|
|
To strengthen practical skills, students must develop and submit 6 practical homework during the course. Each job is evaluated based on code functionality, execution quality, and time transfer. Homework topics: 1. Version control (GIT): Create a repository, create Commit history, base principles for branches (branching) and merging (merging). 2. Data processing: load data from raw sources (CSV/Excel), clean up, type conversion, and basic visualization. 3. Get Web data: develop a Web scraping script to get structured data from public sources. 4. API and NLP: turn on for public API and basic level analysis of resulting text data (NLP). 5. Administrative automation: File system management and automatic document (PDF/Excel) generation. 6. Web Apps (Streamlit): transforming the script into an interactive web app. Requirements and evaluation criteria: • Code functionality: The submitted code must be operational and meet the terms of the task without errors. • Code style: The code must be modular and designed according to THE PEP8 style guidelines. |
||
|
2.
Set of online tests (classes 1-6) |
10.00% from total grade
|
10 points
|
|
After each of the first 6 classes, students must complete a short online test. 1. Test: Python introduction and computational basics • Subject: Python language history, syntax basics, interpreter operating principles, and simple input/output (input/Print) logic. 2. Test: logic and flow control • Subject: Boolean algebra, logical operators, and conditional constructions (if, Elif, else) in decision-making processes. 3. Test: cycles and iterations • Subject: Cyclical algorithms (for, While), iteration management, and effective app flow control for repetitive actions. 4. Test: data structures • Subject: data organization principles in memory using lists, strings, and dictionaries, and their application scenarios. 5. Test: functions • Subject: Code modularity and logical splitting, function definition, parameter transfer, and variable visibility areas. 6. Test: Object oriented programming • Subject: Import object oriented programming paradigm, classes, objects, methods, and external modules into the software architecture. • purpose: Verify students’ theoretical understanding of the subject, terminology and regulatory relationship of programming language acquired. • Format: Questions with choices about definitions, syntax rules, and data type characteristics, excluding complex code analysis. |
||
Examination
|
Title
|
% from total grade
|
Grade
|
|---|---|---|
|
1.
theoretical test of part 1 |
25.00% from total grade
|
10 points
|
|
Written examination in audit (without computer and artificial intelligence aids). • content: The test includes questions on the subjects of classes 1-7: variables, data types, flow control, functions, OOP basics. • requirements: The student must demonstrate the understanding of theoretical principles and the ability to write and analyse simple passages of code by independently selecting the data and management structures that match the task. |
||
|
2.
Final Paper development |
20.00% from total grade
|
10 points
|
|
Objective: to create a large, functioning software solution that integrates at least three different course topics into a single system. Project requirements: 1. Topic integration: Project must combine at least 3 modules (for example, Web scraping for data acquisition + Panda data processing + Streamlit results display). 2. Code quality: The project should be structured with comments and good practice. 3. Version control: The project development process must be traceable in the GIT repository with Commit records. 4. Functionality: The application must be operational, free from critical errors. Example: The app collects data from a news portal (Web scraping), performs headline analysis (NLP), and displays results in an interactive graphic in a web browser (Streamlit). |
||
|
3.
Presentation and advocacy of practical work |
20.00% from total grade
|
10 points
|
|
Progress: oral defence of the project (individual duration of 10 minutes). Evaluation criteria: 1. Code understanding: a student should be able to navigate their code freely, explaining the meaning and operating principle of any row or function. 2. Real-time modification: Student is able to make small changes to the code in the presence of the lecturer (e.g. change data filter conditions or visualization parameters) demonstrating that the work has been done independently and with understanding. 3. Reasoning: ability to justify selected technical solutions (for example, why a specific data structure or library is selected). |
||
Study Course Theme Plan
-
Class/Seminar
|
Modality
|
Location
|
Contact hours
|
|---|---|---|
|
On site
|
Computer room
|
2
|
Topics
|
Lesson: introduction to Python and the basics of computing
Description
As part of the lesson, students are introduced to Python’s history of developing the programming language, its place in today’s tech ecosystem and its wide applicability across different industries. The theoretical presentation covers Python syntax fundamentus, interpreter operating mechanisms and basic computational principles that form the basis for developing algorithmic solutions. The practical part learns the configuration of the work environment and develops the first interactive app, integrating data input and output (input/print) principles to ensure user-system interaction. By the end of the topic, students will have acquired the basic skills needed to work with the Python environment and will be able to independently implement simple software code lines. |
-
Class/Seminar
|
Modality
|
Location
|
Contact hours
|
|---|---|---|
|
On site
|
Computer room
|
2
|
Topics
|
Lesson: logic and flow control
Description
This topic focuses on the program’s decision-making capabilities and logic building. In the theoretical part, students will learn the elements of Boolean algebra (AND, OR, NOT) and conditional constructions (if, Elif, else) needed to build logic circuits. The practical part will develop an app with decision-making logic, such as a simple password-checking system or a conversational bot that provides different answers depending on the user’s choices. By the end of the topic, students will have acquired theoretical knowledge of logical operators and algorithm branching principles in decision-making processes. |
-
Class/Seminar
|
Modality
|
Location
|
Contact hours
|
|---|---|---|
|
On site
|
Computer room
|
2
|
Topics
|
Lesson: cycles and iterations
Description
In this topic, we’ll look at the management structures you need to manage repetitive tasks effectively. In the theoretical part, we will analyze the syntax and application of the for and While cycles and the control of iterations. In the practical part, students will create programs that keep you running, such as forcing you to re-enter your password while it’s correct, or making games include cycles. At the end of the topic, students will understand the construction of cyclic algorithms and theoretical aspects of iteration management required for effective control of program flow. |
-
Class/Seminar
|
Modality
|
Location
|
Contact hours
|
|---|---|---|
|
On site
|
Computer room
|
2
|
Topics
|
Lesson: data structures
Description
In this lesson, we’ll learn about methods for organizing and manipulating information in the Python environment. The theoretical part will analyze the most relevant data structures: lists (lists), strings (tuples), and dictionaries (dictionaries), explaining their differences and application scenarios. In the practical part, students will develop code for a simple system, such as a to-do list or a phone book, where records can be added and deleted. At the end of the topic, students will theoretically be familiar with the organizational principles of different data structures in computer memory and will be able to argue for the choice of the most appropriate data type. |
-
Class/Seminar
|
Modality
|
Location
|
Contact hours
|
|---|---|---|
|
On site
|
Computer room
|
2
|
Topics
|
Lesson: functions
Description
In this topic, we’ll look at the critical role of functions in programming, focusing on logically splitting code. In the theoretical part, we’ll explain the definition of functions, parameter transfer, return values, and the concepts of variable visibility areas (scope). In the practical part, students will refactor the code of previous classes by dividing it into logical blocks and separating specific activities into individual functions. At the end of the topic, students will understand the importance of code modularity, the variable area of vision (scope) theory, and the building blocks of functional programming. |
-
Class/Seminar
|
Modality
|
Location
|
Contact hours
|
|---|---|---|
|
On site
|
Computer room
|
2
|
Topics
|
Lesson: object oriented programming
Description
This topic focuses on basic principles of object oriented programming (OOP) and code organization in modules. In the theoretical part, we will introduce classes, objects, characteristics and methods, as well as explain the import of external modules. In the practical part, students will define the first objects that model the real world, giving them characteristics and behaviors. At the end of the topic, students will theoretically understand the paradigm of object-oriented programming, being able to define and distinguish classes, objects, methods and their role in software architecture. |
-
Class/Seminar
|
Modality
|
Location
|
Contact hours
|
|---|---|---|
|
On site
|
Computer room
|
2
|
Topics
|
Lesson: theoretical examination of part 1
Description
This lesson will include a written examination aimed at assessing students’ theoretical understanding of the basic Python programming principles learned in the first part of the course. The test will include questions about syntax, data types, control structures (cycles and conditions), function design and basic concepts of object oriented programming. Students will need to demonstrate the ability to read and analyze snippets of code, explain terminology, and choose the most appropriate solutions in theoretical situations without having to use a computer. Passing a successful test confirms that the student understands the logic behind software development and is willing to learn more complex topics. |
-
Class/Seminar
|
Modality
|
Location
|
Contact hours
|
|---|---|---|
|
On site
|
Computer room
|
2
|
Topics
|
Lesson: Code quality and version control
Description
This topic introduces students to professional development standards and collaboration tools. The theoretical part will look at PEP8 style guidelines, fault correction (Debugging) techniques and version control systems (Git) basics. In the practical part, students will learn how to create and manage Git repositories to ensure change tracking, collaboration, and secure preservation of project history. At the end of the topic, students will be able to write better quality code and manage versions of it. |
-
Class/Seminar
|
Modality
|
Location
|
Contact hours
|
|---|---|---|
|
On site
|
Computer room
|
2
|
Topics
|
Lesson: programming with AI support
Description
This module integrates state-of-the-art artificial intelligence (AI) tools into the coding process to lift productivity. The theoretical part will showcase the Human loop (Human-in-the-loop) methodology and the role of AI assistants in explaining logic and generating standard code. In the practical part, students will use AI tools to correct errors and develop solutions, improving their productivity and learning speed. At the end of the topic, students will be able to critically evaluate and efficiently use AI-generated code. |
-
Class/Seminar
|
Modality
|
Location
|
Contact hours
|
|---|---|---|
|
On site
|
Computer room
|
2
|
Topics
|
Lesson: data analysis basics (loading and cleaning)
Description
This topic introduces the field of data analysis by introducing the Panda Library as a key tool for effective information processing within Python. In the theoretical part, let’s look at the basic principles of data structuring by explaining the structure of DataFrame and series objects, as well as the most common problems in raw data. In the practical part, students will load real datasets from Excel and CSV files using simple missing value processing and data filtering. At the end of the topic, students will be able to technically load external data sources and apply basic cleaning techniques to convert raw information into an analytical format. |
-
Class/Seminar
|
Modality
|
Location
|
Contact hours
|
|---|---|---|
|
On site
|
Computer room
|
2
|
Topics
|
Lesson: visualization, insights, and modeling
Description
This topic focuses on getting practical insights from organized data and presenting them visually. In the theoretical part, we’ll look at data collection methods and the capabilities of visualization libraries in creating professional graphics. The practical part will apply basic modelling methods, such as trend line analysis, to identify legal relationships and visually present found relationships. At the end of the topic, students will be able to use the data to draw conclusions and create visible schedules. |
-
Class/Seminar
|
Modality
|
Location
|
Contact hours
|
|---|---|---|
|
On site
|
Computer room
|
2
|
Topics
|
Lesson: get Web data (Web scraping)
Description
In this lesson, students will learn web data acquisition techniques to automate information from public sources. In the theoretical part, we’ll look at Web scraping techniques and connecting scripts to communication systems. The practice will develop scripts that collect data and send email alerts based on new information. At the end of the topic, students will have a functional automated monitoring tool developed. |
-
Class/Seminar
|
Modality
|
Location
|
Contact hours
|
|---|---|---|
|
On site
|
Computer room
|
2
|
Topics
|
Lesson: API and natural language processing (NLP)
Description
This lesson combines system connectivity with text analysis using API and NLP methods. In the theoretical part, we’ll look at interactions with application interfaces (APIs) for external data acquisition and NLP basics for text structure analysis. In the practical part, students will integrate API data and conduct sentiment analysis into text data. At the end of the topic, students will be able to connect different systems and perform basic level text content analysis. |
-
Class/Seminar
|
Modality
|
Location
|
Contact hours
|
|---|---|---|
|
On site
|
Computer room
|
2
|
Topics
|
Lesson: Administrative Automation
Description
In this topic, we’ll focus on improving file management skills to drive automation of typical office jobs. In the theoretical part, we’ll analyze the optimization of workflows and the use of scripts to generate documents. In the practical part, students will develop solutions to generate formatted Excel reports and automatically create PDF documents. By the end of the topic, students will have created automated workflows that replace manual and repetitive administrative work. |
-
Class/Seminar
|
Modality
|
Location
|
Contact hours
|
|---|---|---|
|
On site
|
Computer room
|
2
|
Topics
|
Lesson: Create web apps with Streamlit
Description
This topic provides an introduction to developing web solutions using the Streamlit tool. in the theoretical part, we’ll explain how to connect the user interface to the Python code logic that processes data in the background, while in the practical part, students will create a simple app, such as a calculator or questionnaire, that works in an internet browser, so at the end of the topic, students will be able to turn their Python script into a working webpage. |
-
Class/Seminar
|
Modality
|
Location
|
Contact hours
|
|---|---|---|
|
On site
|
Study room
|
2
|
Topics
|
Practical work
|
-
Test
|
Modality
|
Location
|
Contact hours
|
|---|---|---|
|
On site
|
Study room
|
2
|
Topics
|
Exam
|
Bibliography
Required Reading
Sweigart, A. (2019). Automate the Boring Stuff with Python: Practical Programming for Total Beginners. 2nd Edition. No Starch Press. •Komentārs: Ideāli atbilst kursa 12.-14. nodarbībai (Web Scraping, Excel/PDF automatizācija).Suitable for English stream
Matthes, E. (2023). Python Crash Course: A Hands-On, Project-Based Introduction to Programming. 3rd Edition. No Starch Press. •Komentārs: Viena no pasaulē atzītākajām grāmatām iesācējiem. Tā lieliski nosedz kursa 1. daļu (sintakse, saraksti, funkcijas, klases) un sniedz labus praktisko projektu piemērus.Suitable for English stream
McKinney, W. (2022). Python for Data Analysis: Data Wrangling with pandas, NumPy, and Jupyter. 3rd Edition. O'Reilly Media. •Komentārs: Sarakstījis Pandas bibliotēkas autors. Šī ir "zelta standarta" grāmata kursa 10.-11. nodarbībai (Datu analīze un tīrīšana). Pieejama arī tiešsaistē.Suitable for English stream
Additional Reading
Downey, A. B. (2015). Think Python: How to Think Like a Computer Scientist. 2nd Edition. O'Reilly Media. Komentārs: Šī grāmata vairāk fokusējas uz teoriju un datorzinātņu domāšanu. Tā ir ļoti noderīga, lai sagatavotos 1. daļas teorētiskajam pārbaudījumam un izprastu jēdzienus dziļāk.Suitable for English stream
Real Python (Tutorials & Articles) Komentārs: Kvalitatīvs resurss, kurā padziļināti izskaidrotas specifiskas tēmas, piemēram, "Venv" izveide, OOP principi vai API integrācija.Suitable for English stream
Streamlit Documentation Komentārs: Tā kā Streamlit (15. nodarbība) ir specifiska bibliotēka, oficiālā dokumentācija ir labākais un aktuālākais mācību avots.Suitable for English stream