Skip to main content
Skip header

Basics of Algorithms and Programming

* Exchange students do not have to consider this information when selecting suitable courses for an exchange stay.

Course Unit Code450-2079/01
Number of ECTS Credits Allocated5 ECTS credits
Type of Course Unit *Compulsory
Level of Course Unit *First Cycle
Year of Study *First Year
Semester when the Course Unit is deliveredSummer Semester
Mode of DeliveryFace-to-face
Language of InstructionCzech
Prerequisites and Co-Requisites Course succeeds to compulsory courses of previous semester
Name of Lecturer(s)Personal IDName
ROZ132Ing. Jan Rozhon, Ph.D.
PRA132doc. Ing. Michal Prauzek, Ph.D.
SAF077Ing. Jakub Šafařík, Ph.D.
TOV020Ing. Jaromír Továrek, Ph.D.
Summary
The course is an introductory course on algorithmization and programming in all electrotechnical disciplines due to the wide applicability of language C. Students are familiar with the basic hardware elements of the computer and their relation to selected program constructions. Discussed algorithms and data structures are demonstrated, the students are encouraged to structured approach to algorithmic solved problems. Emphasis is placed on the practical implementation of algorithms and data structures. In the second part of the course students are familiar with solutions of common tasks in higher programming languages with emphasis on fast prototyping and development and solution of practical tasks using functional and object-oriented approach.
Learning Outcomes of the Course Unit
The aim is to introduce students to the basic problems of algorithms and programming and to demonstrate implementation techniques introduced in higher programming languages. After completing the course, students will be able algorithmize basic tasks and create programs for solving simple problems using basic algorithmic structures in the general development environment. Students will understand the relationship between some features of computer architecture elements and their display in the C programming language needed to handle tasks using non-standard peripherals. Also students will be able to analyze and algorithmize simple problems using a structured approach.
Course Contents
Lectures:
1. Introduction to algorithmization and programming, motivation, algorithm, computer architecture, compilation process.
2. Electronic memory, types of memory, variables, constants, simple data types, basic operators, formatted input and output.
3. Control structures: Boolean expression, comma operator, conditional expression, conditions, cycles, switch, jump command.
4. Functions: function declarations and definitions, function parameters, validity range, function return value.
5. Memory classes, type modifiers, type casting, preprocessor: macros, includes, conditional compilation, separate compilation.
6. Indicators: pointers and functions, address arithmetic, parameter passing by value and reference.
7. Single-dimensional arrays, multidimensional arrays, strings, structures, union, enumeration types, typedef operator, bit operations.
8. Introduction to the scripting approach to solving algorithmic problems. Program environment - Bash, Python.
9. Program structure, function, console output in the Bash and Python scripting environment.
10. Advanced data types in scripting environments, their use and benefits, optimization, libraries and work with them.
11. Implement Cycles, Conditions, and Recursions in Python Scripting Environment.
12. File system work, search, rights, write and read. JSON format.
13. A brief basis for object programming approach.
14. Discrete phenomena and their simulations. Code documentation.



Labs:
1. Language C: programming environment
2. Language C: variable definition, simple data types, formatted input and output.
3. Language C: boolean expression, comma operator, conditional expression, conditions, cycles, switch, goto command.
4. Language C: function definitions and declaration, function parameters, validity of identifiers, function return value.
5. Language C: memory classes, type modifiers, type casting, preprocessor: macros, includes, conditional compilation, separate compilation.
6. Language C: pointers, pointers and functions, address arithmetic, parameter passing by value and reference.
7. Language C: one-dimensional arrays, multidimensional arrays, strings, structures, union, enumeration types, typedef operator, bit operations.
8. Shell Bash: system utilities and their use in simple scripts.
9. Shell Bash: chaining utilities, working with variables, definition of function, console output.
10. Python Language: Comparison with Bash approach to defining simple scripts. Work with variable output on the console. Formal definition of script structure, output formatting, functions and their chaining.
11. Python Language: working with dictionaries, numerical libraries and computations with them, other commonly used libraries in Python, conditional branching, and use of data types in terms.
12. Python language: cycles and recursion and their use for numerical computations and simulations, file system work, JSON format.
13. Python language: classes and inheritance, practical examples of the use of objects in scripting.
14. Python Language: An introduction to simulation discrete phenomena.
Recommended or Required Reading
Required Reading:
KERNIGHAN, Brian W. a Dennis M. RITCHIE. The C programming language. 2nd ed. Englewood Cliffs, N.J.: Prentice Hall, c1988.
SEDGEWICK, Robert, Kevin Daniel WAYNE a Robert. DONDERO. Introduction to programming in Python: an interdisciplinary approach. New York: Addison-Wesley, 2015. ISBN 9780134076430.
NEWHAM, Cameron. a Bill. ROSENBLATT. Learning the bash Shell. 3rd ed. Sesbastopol, [Calif.]: O'Reilly, c2005. ISBN 0596009658.
HEROUT, P. Učebnice jazyka C. Praha: [Středisko pro podporu studentů se specifickými potřebami ELSA ČVUT], 2015.
HARMS, Daryl D. a Kenneth MCDONALD. Začínáme programovat v jazyce Python. 2., opr. vyd. Přeložil Ivo FOŘT, přeložil Lubomír ŠKAPA. Brno: Computer Press, 2008. ISBN 9788025121610.
NEWHAM, Cameron. a Bill. ROSENBLATT. Learning the bash Shell. 3rd ed. Sesbastopol, [Calif.]: O'Reilly, c2005. ISBN 0596009658.

Recommended Reading:
VAN DER LINDEN, Peter. Expert C programming: deep C secrets. Mountain View: SunSoft Press, 1994.
KERNIGHAN, Brian W. a Dennis M. RITCHIE. Programovací jazyk C. Brno: Computer Press, 2006.
Planned learning activities and teaching methods
Lectures, Individual consultations, Tutorials, Experimental work in labs, Project work
Assesment methods and criteria
Task TitleTask TypeMaximum Number of Points
(Act. for Subtasks)
Minimum Number of Points for Task Passing
Graded creditGraded credit100 51