# VSFS:B_UPg Introduction to Programming - Course Information

## B_UPg Introduction to Programming

**University of Finance and Administration**

Winter 2023

**Extent and Intensity**- 2/2/0. 6 credit(s). Type of Completion: zk (examination).
**Guaranteed by**- doc. RNDr. Jan Lánský, Ph.D.

Department of Computer Science and Mathematics - Departments - University of Finance and Administration

Contact Person: Ivana Plačková **Prerequisites**- There are no prerequisites for this course.
**Course Enrolment Limitations**- The course is offered to students of any study field.
**Course objectives**- This is a basic programming course for first year students of Applied Informatics.
At the end of the course students should be able to:

- solve simple algorithmic problems

- use basic constructs of programming languages

- develop and debug computer programs in an integrated devolopmental environment. **Learning outcomes**- Upon completion of this course the student will be able to:

- solve basic algorithmic tasks

- correctly use and implement common terms in relation to programming (variables, logical operators, data types, selected cycles, branching, etc.) - see the outline

- use basic constructions of programming languages

- create and debug programs in an integrated development environment **Syllabus**- 1. Problem, algorithm. Variable, assignment, arithmetic operators, conditional statement.
- 2. Composed statement, logic operators, while and for loop. Sum of digits, Euclid's algorithm, prime factorization, primality test. Time complexity of algorithms.
- 3. Functions, data types, priority and associativity of operators, random numbers, enumerated types, multiple branching, structures. Mathematical functions. Testing the correctness of programs.
- 4. Passing function parameters by reference. Array, finding the value and number of occurrences, the longest sequence. Eratosthenes sieve. Debugging.
- 5. Sorting algorithms, selection sort, insertion sort, bubble sort, counting sort, binary search in sorted array. Global variables. Measuring the number of operations and run-time.
- 6. Characters, strings. Lexicographical order, concatenation, substring, searching the occurrence of a character or substring. Delete, insert and replace a character or strings.
- 7. Horner scheme, converting between positional numeral systems. Long integer numbers, the sum, difference, product, quotient. Long real numbers, fractions. Constants.
- 8. Text and binary files, reading and writing. Managing filesystem.
- 9. Two-dimensional array, array of arrays. Matrix, multiplication of a matrix row by a constant, swapping two rows of a matrix, sum of matrices, product of matrices. ASCII Art.
- 10. Recursion, factorial, convert from decimal to binary, Fibonacci numbers (+ version with dynamic programming). Binary search. Towers of Hanoi. Koch's snowflake.
- 11. Stack, queue (cyclic, with shift, priority queue). Backtracking: N-digit number, arithmetic operators adding.
- 12. Backtracking: chess queens problem, magic squares, knight's tour, pruning, heuristics. Wool: the shortest route of a knight across the chessboard.

**Literature**- Bory, P. : C# bez předchozích znalostí, Brno: Computer Press, 2016. ISBN:978-80-251-4686-6

*required literature*- V.Váňa: Základy programování v C# pro naprosté začátečníky, http://www.eamos.cz/amos/kat_inf/externi/kat_inf_03611/files/podklady_pro_cviceni/zacatekcsharp.pdf
- P.Töpfer: Úvod do programování, IS -> studijní materiály -> UPg.pdf
- P.Töpfer: Algoritmy a programovací techniky, Prometheus Praha 2007 (2. vyd.)
- P.Töpfer: Základy programování v úlohách, Scientia Praha 1997

*recommended literature***Teaching methods**- Lectures and seminars in full-time study, tutorials in part-time study. Minimal required participation is 75% on seminars in full-time study and 50% on tutorials in part-time study.
**Assessment methods**- The course is completed with a credit and written exam. Several homeworks (design and debugging of small programs) are required to award the credit. Tasks description and instructions are included in the file IS -> studijní materiály -> cviceni.doc

In the written exam students should write programs or functions to solve given tasks. The correctness, efficiency and the choice of appropriate programming language tools are judged. **Language of instruction**- Czech
**Follow-Up Courses****Further comments (probably available only in Czech)**- The course can also be completed outside the examination period.

The course is taught annually.

The course is taught: every week.

Information on the extent and intensity of the course: 16 hodin KS/semestr.

- Enrolment Statistics (recent)

- Permalink: https://is.vsfs.cz/course/vsfs/winter2023/B_UPg