SubjectsSubjects(version: 895)
Course, academic year 2020/2021
  
Programming 1 - NMIN111
Title: Programování 1
Guaranteed by: Department of Software and Computer Science Education (32-KSVI)
Faculty: Faculty of Mathematics and Physics
Actual: from 2020
Semester: winter
E-Credits: 3
Hours per week, examination: winter s.:0/2 C [hours/week]
Capacity: unlimited
Min. number of students: unlimited
Virtual mobility / capacity: no
State of the course: taught
Language: Czech
Teaching methods: full-time
Additional information: http://mj.ucw.cz/vyuka/2021/p1m/
Guarantor: doc. RNDr. Pavel Töpfer, CSc.
Class: M Bc. FM
M Bc. FM > Povinné
M Bc. FM > 1. ročník
M Bc. MMIB
M Bc. MMIB > Povinné
M Bc. MMIB > 1. ročník
M Bc. MMIT
M Bc. MMIT > Povinné
M Bc. OM
M Bc. OM > Povinné
M Bc. OM > 1. ročník
Classification: Informatics > Programming
Incompatibility : NMIN101, NPRG030
Interchangeability : NPRG030
Is co-requisite for: NMIN112
Is incompatible with: NPRG030
Is interchangeable with: NMIN101
Annotation -
Last update: doc. RNDr. Pavel Töpfer, CSc. (25.09.2019)
A basic course of programming for first-year students of mathematics. The course covers programming in Python, basic algorithms and data structures and practical program design and debugging.
Course completion requirements -
Last update: doc. RNDr. Pavel Töpfer, CSc. (30.08.2019)

Students 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.

Literature -
Last update: doc. RNDr. Pavel Töpfer, CSc. (29.10.2019)

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

Syllabus -
Last update: doc. RNDr. Pavel Töpfer, CSc. (24.02.2021)
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
  • operations with trees

 
Charles University | Information system of Charles University | http://www.cuni.cz/UKEN-329.html