SubjectsSubjects(version: 928)
Course, academic year 2022/2023
   Login via CAS
Programming for Physicists - NOFY056
Title: Programování pro fyziky
Guaranteed by: Laboratory of General Physics Education (32-KVOF)
Faculty: Faculty of Mathematics and Physics
Actual: from 2020 to 2022
Semester: winter
E-Credits: 5
Hours per week, examination: winter s.:2/2, C+Ex [HT]
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://utf.troja.mff.cuni.cz/~ledvinka, http://geo.mff.cuni.cz/~lh/NOFY056
Guarantor: RNDr. Ladislav Hanyk, Ph.D.
doc. Mgr. Tomáš Ledvinka, Ph.D.
Is incompatible with: NMUE022
In complex pre-requisite: NPRG041, NPRX041
Annotation -
Last update: Mgr. Hana Kudrnová (05.05.2023)
One-semester basic course of programming for students of the 1st year of master and bachelor study of physics. Solution of selected simple problems is tought on examples, using accessible implementations of the Pascal language.
Aim of the course -
Last update: doc. Mgr. Tomáš Ledvinka, Ph.D. (03.05.2023)

Students ready to express a thought in a programming language (like Pascal, C, Fortran).

Course completion requirements - Czech
Last update: RNDr. Ladislav Hanyk, Ph.D. (09.10.2017)

Pro absolvování předmětu je předepsán zápočet i zkouška.

Pro získání zápočtu je třeba zpracovat v požadovaném rozsahu práci zadanou vyučujícím (tj. vedoucím cvičení), obvykle jednu rozsáhlejší zápočtovou úlohu a/nebo několik průběžně zadávaných jednodušších úloh. Součástí hodnocení může být i ocenění účasti na cvičeních, splnit zápočet je však možné odevzdáním požadované práce i bez účasti na cvičeních. Vyučující může stanovit bodový systém, se kterým seznámí studenty na začátku semestru.

Konání zkoušky není podmíněno získáním zápočtu ani účastí na přednáškách.

Literature -
Last update: doc. Mgr. Tomáš Ledvinka, Ph.D. (03.05.2023)

Lecture notes:

  • http://utf.troja.mff.cuni.cz/~ledvinka
  • http://geo.mff.cuni.cz/~lh/NOFY056

and also

  • N. Wirth: Algoritmy a datové struktury, Alfa, Bratislava 1988
  • J. Drózd, R. Kryl: Začínáme s programováním, Grada, Praha 1992
  • P. Töpfer: Základy programování v úlohách, Scientia, Praha 1997
  • P. Töpfer, D. Töpferová: Programování - Sbírka úloh, Fortuna, Praha 1998
  • P. Satrapa: Pascal pro zelenáče, Neokortex, Praha 2000
  • Příručky pro Turbo Pascal, Borland Pascal a Delphi, 1990-2003
Teaching methods -
Last update: HANYK/MFF.CUNI.CZ (12.04.2008)

Lecture + practicals

Requirements to the exam - Czech
Last update: RNDr. Ladislav Hanyk, Ph.D. (09.10.2017)

Konání zkoušky není podmíněno získáním zápočtu ani účastí na přednáškách. Zkouška má písemnou a ústní část, student musí úspěšně vykonat obě části. Během písemné části student prokazuje schopnost algoritmizace několika drobnějších úloh pomocí vybraného programovacího jazyka, v ústní části je prověřena studentova znalost látky vyučované na přednáškách.

Syllabus -
Last update: doc. Mgr. Tomáš Ledvinka, Ph.D. (03.05.2023)
1. Problems
Classical elementary algorithms (Euclid, Eratosthenes Sieve). Mathematical expressions (Horner scheme, errors), examples of evaluation and approximation of functions. Fundamental numerical algorithms (root finding, integration). Array handling, selected algorithms of linear algebra. Complexity of the algorithm. Searching and sorting, associative arrays. Queue and stack. Data input and output. Outline of 2D graphics (gnuplot, PostScript). Random numbers. Modularity, examples of application of library procedures and objects.

2. Programming language Pascal
Variables (and constants). Integer types, char, boolean, floating-point types. Expressions, operators, priority, standard functions. Assignment, input and output. Simple and stuctured statement. Conditions, loops. Program, procedure and function. Scope. Argument passing by value and reference, constant arguments. Structured data (array, structure, string). Inicialized variables. Binary operations and shortened evaluation of logical expressions. Text input and output. Typed files. Procedures and functions as arguments and variables. Modules (units), working with documentation of libraries. Dynamical data structures, pointers. A few words on objects.

3. Getting started with personal computer
Programs and data. Standard input and output, redirection, scripts. Basic utilities.

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