Veidlapa Nr. M-3 (8)
Study Course Description

Programming basics

Main Study Course Information

Course Code
SZF_166
Branch of Science
Electrical engineering, Electronic engineering, Information engineering
ECTS
3.00
Target Audience
Business Management; Information and Communication Science; Management Science
LQF
Level 7
Study Type And Form
Full-Time

Study Course Implementer

Course Supervisor
Structure Unit Manager
Structural Unit
Faculty of Social Sciences
Contacts

Kuldīgas iela 9c, Rīga

About Study Course

Objective

The aim of this Python programming course is to provide students with a comprehensive foundation in Python programming, equipping them with the knowledge, skills, and competencies needed to solve real-world problems, design efficient and user-friendly applications, and engage in continuous professional development. By mastering Python's control structures, data structures, functions, and object-oriented programming principles, students will develop the ability to create structured, reusable software solutions while critically evaluating and selecting appropriate programming methods for diverse project needs.

Preliminary Knowledge

To successfully participate in this course, students should have basic computer literacy, including familiarity with using a computer, managing files and folders, and navigating a modern operating system. A solid foundation in basic arithmetic and mathematical operations, as well as familiarity with fundamental concepts like variables and simple equations, will also be helpful. Additionally, proficiency in English is essential for reading and understanding technical materials, as most programming resources and documentation are available in English. Prior programming experience is not mandatory, but a willingness to learn and experiment with new concepts is crucial for success in this course.

Learning Outcomes

Knowledge

1.List basic elements of Python programming language and explain their application.

Individual work and tests

Test: introduction to Python programming

2.Name key management structures and data structures and explain their role in effective programming.

Individual work and tests

Test: Use of control structures in programming Presenting your practical work

3.Describe the principles of functions and object oriented programming (OOP) and their advantages in ensuring modularity of the program.

Individual work and tests

Presenting your practical work Test: Object oriented programming 1 Test: Object oriented programming 2

Skills

1.Build and use Python control structures and data structures to solve real-world problems.

Individual work and tests

Development of a simple management system in Python Presenting your practical work

2.Develop features and use object-oriented programming approaches to improve programme structure and reusability.

Individual work and tests

Presenting your practical work Development of a simple management system in Python Test: Need, design and use of functions 1 Test: Need, design and use of functions 2

3.Use Python to process data and analyze across different projects.

Individual work and tests

Test: Types and uses of data structures 1 Test: Types and uses of data structures 2 Development of a simple management system in Python Presenting your practical work Test: Python programming language application in AI development 1 Test: Python programming language application in AI development 2

4.Develop simple graphical user interfaces, making programmes user-friendly and visually appealing.

Individual work and tests

Test: Graphical user interface 1 Test: Graphical user interface 2

Competences

1.Apply Python programming language capabilities to solve real-life problems and plan projects efficiently.

Individual work and tests

Development of a simple management system in Python Presenting your practical work

2.Create structured and user-friendly apps using both control structures and object-oriented programming.

Individual work and tests

Presenting your practical work Development of a simple management system in Python

3.Demonstrate critical thinking by selecting appropriate programming methods and solutions.

Individual work and tests

Development of a simple management system in Python Presenting your practical work

4.Find and use appropriate technical solutions in different programming situations.

Individual work and tests

Presenting your practical work Development of a simple management system in Python

Assessment

Individual work

Title
% from total grade
Grade
1.

Development of a simple management system in Python

40.00% from total grade
10 points

Objective:

Create a Python program that simulates the main functions of a library management system - book management, search, lending and statistical reporting. All data is stored in a common JSON file (library_data.json).

Data Model - book (book):

Each record must include:

  • Name (string)
  • Author (string)
  • Price (float)
  • Available number (int)
  • Lended number (int)

required function (functionality):

1. Add and update books

  • Input data: name, author, price, number available.
  • If the book already exists, updates its information.
  • If the book does not exist, adds a new entry.
  • The data is stored in library_data.json.

2. Viewing the list of all books

  • Outputs each book with all its attributes.

3. When you issue a book

  • The user enters the name of the book and the number to be lendeded.
  • Reduce the number available and increase the number issued if possible.

4. The book return

  • User enters the name of the book and the number of returns.
  • Increase the number available and reduce the number issued if possible.

5. Search for books

  • By name or author.
  • Output the found books with their data.

6. Top 5 most issued books

  • Based on number of fields issued.

7. Top 5 least-issued books

  • Based on number of fields issued.

8. Top 5 most expensive books

  • Based on Cena field.

Develop the code following all best practice principles.

Examination

Title
% from total grade
Grade
1.

Test: introduction to Python programming

4.00% from total grade
10 points

Test on the material covered in class.

2.

Test: Use of control structures in programming

4.00% from total grade
10 points

Test on the material covered in class.

3.

Test: Need, design and use of functions 1

4.00% from total grade
10 points

Test on the material covered in class.

4.

Test: Need, design and use of functions 2

4.00% from total grade
10 points

Test on the material covered in class.

5.

Test: Types and uses of data structures 1

4.00% from total grade
10 points

Test on the material covered in class.

6.

Test: Types and uses of data structures 2

4.00% from total grade
10 points

Test on the material covered in class.

7.

Test: Object oriented programming 1

4.00% from total grade
10 points

Test on the material covered in class.

8.

Test: Object oriented programming 2

4.00% from total grade
10 points

Test on the material covered in class.

9.

Test: Graphical user interface 1

4.00% from total grade
10 points

Test on the material covered in class.

10.

Test: Graphical user interface 2

4.00% from total grade
10 points

Test on the material covered in class.

11.

Test: Python programming language application in AI development 1

4.00% from total grade
10 points

Test on the material covered in class.

12.

Test: Python programming language application in AI development 2

4.00% from total grade
10 points

Test on the material covered in class.

13.

Presenting your practical work

12.00% from total grade
10 points

Pēdējā nodarbībā prezentēt izveidoto Python programmu bibliotēkas pārvaldībai, īpašu uzmanību pievēršot programmas kodam. Prezentācijas ilgums 10 minūtes, pēc prezentācijas jāspēj atbildēt uz auditorijas uzdotajiem jautājumiem.

The presentation should show:

  • Software structure (files and modules).
  • In the main function code (for example: add_book()).
  • For each function, a brief explanation of its operating principle is required:
    • What data is being entered,
    • How the function processes this data,
    • How the library_data.json file is updated or the result is displayed to the user.
  • Present how the app works.

Study Course Theme Plan

FULL-TIME
Part 1
  1. Class/Seminar

Modality
Location
Contact hours
On site
Computer room
2

Topics

-
Description
Annotation: In this topic, we will learn about developing graphical user interfaces (GUIs) in Python to create user-friendly and visually appealing applications. In the theoretical part, we will cover basic GUI principles such as creating windows and buttons, input elements and organising the interface layout. GUI libraries such as Tkinter and Turtle will also be covered, which help to easily create GUIs in Python. In the practical part, participants will design their own simple user interface by experimenting with different interface elements and functionalities. By the end of the topic, students will have learned the basics of GUI development, which will allow them to create interactive and user-friendly Python applications.
  1. Class/Seminar

Modality
Location
Contact hours
On site
Computer room
2

Topics

Object Oriented Programming (OOP)
Description
Annotation: In this topic, we will look at the basic principles of object-oriented programming (OOP) and their application in Python. In the theoretical part, we will introduce the basics of OOP such as classes, objects, properties and methods, as well as the essential principles of inheritance, polymorphism and encapsulation. We will explain how OOP helps to build more structured and reusable programs. In the practical part, participants will create their own classes and objects, practice defining methods and properties, and use OOP to solve problems that require more complex organisation of data and logic. By the end of the topic, students will have gained a basic understanding of OOP and will be able to apply this approach in their Python programs to create more flexible and maintainable solutions.
  1. Class/Seminar

Modality
Location
Contact hours
On site
Computer room
2

Topics

Object Oriented Programming (OOP)
Description
Annotation: In this topic, we will look at the basic principles of object-oriented programming (OOP) and their application in Python. In the theoretical part, we will introduce the basics of OOP such as classes, objects, properties and methods, as well as the essential principles of inheritance, polymorphism and encapsulation. We will explain how OOP helps to build more structured and reusable programs. In the practical part, participants will create their own classes and objects, practice defining methods and properties, and use OOP to solve problems that require more complex organisation of data and logic. By the end of the topic, students will have gained a basic understanding of OOP and will be able to apply this approach in their Python programs to create more flexible and maintainable solutions.
  1. Class/Seminar

Modality
Location
Contact hours
On site
Computer room
2

Topics

Using control structures in programming
Description
Annotation: In this topic, we will focus on the programming control structures that are essential for logic generation and program flow control. In the theoretical part, we will look at control structures such as conditional constructs (if, else, elif), loops (for, while) and interrupt statements (break, continue). In the practical part, participants will build programs that use control structures to solve various tasks, such as checking user input. At the end of the topic, students will have acquired the skills to apply control structures to solve problems in Python.
  1. Class/Seminar

Modality
Location
Contact hours
On site
Computer room
2

Topics

-
Description
Annotation: In this topic, we will learn about developing graphical user interfaces (GUIs) in Python to create user-friendly and visually appealing applications. In the theoretical part, we will cover basic GUI principles such as creating windows and buttons, input elements and organising the interface layout. GUI libraries such as Tkinter and Turtle will also be covered, which help to easily create GUIs in Python. In the practical part, participants will design their own simple user interface by experimenting with different interface elements and functionalities. By the end of the topic, students will have learned the basics of GUI development, which will allow them to create interactive and user-friendly Python applications.
  1. Class/Seminar

Modality
Location
Contact hours
On site
Computer room
2

Topics

Need, design and use of functions
Description
Annotation: In this topic, we will look at the essential role of functions in programming, as well as the principles of creating and using them in Python. In the theoretical part, we will explain why functions are important for code modularity, reusability and readability. We will look at function syntax, parameter passing, return values, and the differences between built-in and user-defined functions. In the practical part, participants will build and test their own functions, solving a variety of problems that require logical decomposition and code reuse. At the end of the topic, students will be able to use functions effectively to improve the structure and performance of their program.
  1. Class/Seminar

Modality
Location
Contact hours
On site
Computer room
2

Topics

Types and uses of data structures
Description
Annotation: In this topic, we will learn about the types of data structures in Python and their role in efficient data organisation and processing. In the theoretical part, we will look at different data structures such as lists, sets, dictionaries and tuples, explaining their properties, advantages and use cases. In the practical part, students will learn how to choose the most appropriate data structure for different programming situations and perform tasks that use these structures for data management and manipulation. At the end of the topic, students will be able to understand, select and use different data structures according to the specific tasks within Python programming.
  1. Class/Seminar

Modality
Location
Contact hours
On site
Computer room
2

Topics

Python programming language for AI development and practical examples
Description
Annotation: In this topic, we will focus on Python as one of the main programming languages for Artificial Intelligence (AI) development, exploring its application in machine learning and data analysis projects. In the theoretical part, we will look at the main stages of an AI project, from data preparation to analysis and interpretation of results, and explain how the Python language helps to implement these stages in an efficient and structured way. In the practical part, participants will develop simple solutions to practice the use of AI approaches in a Python environment to solve different problems. At the end of the topic, students will have acquired a basic understanding of AI development in Python and the practical skills needed to implement simple AI projects.
  1. Class/Seminar

Modality
Location
Contact hours
On site
Computer room
2

Topics

Python programming language for AI development and practical examples
Description
Annotation: In this topic, we will focus on Python as one of the main programming languages for Artificial Intelligence (AI) development, exploring its application in machine learning and data analysis projects. In the theoretical part, we will look at the main stages of an AI project, from data preparation to analysis and interpretation of results, and explain how the Python language helps to implement these stages in an efficient and structured way. In the practical part, participants will develop simple solutions to practice the use of AI approaches in a Python environment to solve different problems. At the end of the topic, students will have acquired a basic understanding of AI development in Python and the practical skills needed to implement simple AI projects.
  1. Class/Seminar

Modality
Location
Contact hours
On site
Computer room
2

Topics

Types and uses of data structures
Description
Annotation: In this topic, we will learn about the types of data structures in Python and their role in efficient data organisation and processing. In the theoretical part, we will look at different data structures such as lists, sets, dictionaries and tuples, explaining their properties, advantages and use cases. In the practical part, students will learn how to choose the most appropriate data structure for different programming situations and perform tasks that use these structures for data management and manipulation. At the end of the topic, students will be able to understand, select and use different data structures according to the specific tasks within Python programming.
  1. Class/Seminar

Modality
Location
Contact hours
On site
Computer room
2

Topics

Need, design and use of functions
Description
Annotation: In this topic, we will look at the essential role of functions in programming, as well as the principles of creating and using them in Python. In the theoretical part, we will explain why functions are important for code modularity, reusability and readability. We will look at function syntax, parameter passing, return values, and the differences between built-in and user-defined functions. In the practical part, participants will build and test their own functions, solving a variety of problems that require logical decomposition and code reuse. At the end of the topic, students will be able to use functions effectively to improve the structure and performance of their program.
  1. Class/Seminar

Modality
Location
Contact hours
On site
Computer room
2

Topics

Introduction to Python programming
Description
Annotation: In this topic, we will learn about the Python programming language, its applications and its advantages. In the theoretical part, we will look at the history of Python, the basics of syntax and the most typical Python use cases such as data processing, web development and automation. In the practical part, students will get started with the Python interpreter, learn the first commands and create simple programming solutions to reinforce their understanding of the language's fundamentals and syntax. At the end of the topic, students will be able to write elementary Python programs.
Total ECTS (Creditpoints):
3.00
Contact hours:
24 Academic Hours
Final Examination:
Exam

Bibliography

Required Reading

1.

Matthes E. 2023. Python Crash Course: A Hands-On, Project-Based Introduction to Programming. 3rd ed. No Starch PressSuitable for English stream

2.

Downey A. B. 2015. Think Python: How to Think Like a Computer Scientist. 2nd ed. O'Reilly MediaSuitable for English stream

3.

Slatkin B. 2019. Effective Python: 90 Specific Ways to Write Better Python. 2nd ed. Addison-Wesley ProfessionalSuitable for English stream