A basic course of programming for first-year students. The course covers programming in Python,
basic algorithms and data structures and practical program design and debugging.
Last update: Töpfer Pavel, doc. RNDr., CSc. (18.05.2022)
Seminář pro 1. ročník bakalářského studia. Obsahem kursu jsou základy programování v jazyce
Python.
Last update: Töpfer Pavel, doc. RNDr., CSc. (18.05.2022)
Course completion requirements -
TStudents will receive a credit for this course by active participation in the practice sessions in the computer lab. Generally this means that students must complete the assigned programming exercises, either during the lab session or later on at home.
Due to the nature of this requirement, a failed attempt cannot be repeated as is possible for exams. The instructor may establish conditions whereby a student can make up for missing homework assignments.
Last update: Töpfer Pavel, doc. RNDr., CSc. (10.07.2022)
Předmět je zakončen zápočtem. K získání zápočtu se požaduje aktivní účast na cvičení spočívající obvykle v řešení úkolů (programů) v termínech stanovených cvičícím (ať už na cvičení nebo doma).
Povaha tohoto požadavku neumožňuje vypsat opravné termíny. Vyučující může stanovit podmínky, za nichž student může nahradit chybějící domácí úkoly.
Last update: Töpfer Pavel, doc. RNDr., CSc. (10.07.2022)
Literature -
John V. Guttag, Introduction to Computation and Programming Using Python: With Application to Understanding Data, 2nd ed.,, MIT Press, Cambridge, MA 2016
Allen B. Downey, Think Python: How to Think Like a Computer Scientist, 2nd ed., O'Reilly Media, Sebastopol, CA 2015
Last update: Töpfer Pavel, doc. RNDr., CSc. (10.07.2022)
John V. Guttag, Introduction to Computation and Programming Using Python: With Application to Understanding Data, 2nd ed.,, MIT Press, Cambridge, MA 2016
Allen B. Downey, Think Python: How to Think Like a Computer Scientist, 2nd ed., O'Reilly Media, Sebastopol, CA 2015
Last update: Töpfer Pavel, doc. RNDr., CSc. (10.07.2022)
Syllabus -
Python programming language
Python as a calculator
integers
float numbers and accuracy problems
operators and their priorities
assignment
conditions and cycles (while)
program structure: comments, indentation
basic input() and print()
program debugging, using the development environment (IDLE/PyCharm)
for loop, range()
break, continue
lists used as fields
the list assignment assigns only the link
function definition and function call
optional parameters
abstraction and modularity of programs
local identifiers and their visibility
recursion principle
functions passing to other functions
lists and their operations
queue and stack
iterating over a list
cuts
list comprehension
strings
use of libraries, import
graphs drawing using matplotlib
details of type system
tuples
dictionaries and operations with them
exceptions and their catching
classes and objects
description of reality using objects
type derivation, inheritance
working with files
standard library
Basic algorithms
time complexity
decomposition of numbers into digits
Euclidean algorithm
prime numbers calculated by dividing till the square root
factorization
evaluation of polynomials (Horner's scheme)
the k’th smallest element computed in time k*n
Eratosthenes sieve
matrix multiplication
Gauss elimination
elementary sorting algorithms
binary search
finding the roots of functions: halving the interval, linear interpolation
merging sorted sequences
Last update: Töpfer Pavel, doc. RNDr., CSc. (10.07.2022)
Základy programovacího jazyka Python
Python jako kalkulačka
celá čísla
floaty a problémy s přesností
operátory a jejich priority
přiřazení
základní podmínky a cykly (while)
struktura programu: komentáře, odsazování
triviální input() a print()
ladění programu, používání vývojového prostředí (IDLE/PyCharm)