B_UPg Introduction to Programming

University of Finance and Administration
Winter 2016
Extent and Intensity
2/2. 7 credit(s). Type of Completion: zk (examination).
Teacher(s)
doc. RNDr. Jan Lánský, Ph.D. (seminar tutor)
Guaranteed by
doc. RNDr. Jan Lánský, Ph.D.
Department of Computer Science and Mathematics – Departments – University of Finance and Administration
Contact Person: Ing. Barbora Ptáčková
Timetable of Seminar Groups
B_UPg/cAPH: Wed 14:00–14:44 E303PC, Wed 14:45–15:30 E303PC, J. Lánský
B_UPg/pAPH: Wed 12:15–12:59 E303PC, Wed 13:00–13:45 E303PC, J. Lánský
B_UPg/vAPH: Fri 21. 10. 14:00–15:30 E303PC, 15:45–17:15 E303PC, Fri 2. 12. 15:45–17:15 E303PC, 17:30–19:00 E303PC, Fri 16. 12. 14:00–15:30 E303PC, 15:45–17:15 E303PC, 17:30–19:00 E303PC, J. Lánský
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.
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, Fibinacci 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
    recommended 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
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.
Information on the extent and intensity of the course: 14 hodin KS/semestr.
The course is also listed under the following terms Winter 2007, Summer 2008, Winter 2008, Summer 2009, Winter 2009, Summer 2010, Winter 2010, Summer 2011, Winter 2011, summer 2012, Winter 2012, Winter 2013, Winter 2014, Winter 2015, Winter 2017, Winter 2018, Winter 2019, Winter 2020, Winter 2021, Winter 2022, Winter 2023, Winter 2024.
  • Enrolment Statistics (Winter 2016, recent)
  • Permalink: https://is.vsfs.cz/course/vsfs/winter2016/B_UPg