# TDT4127 - Programming and Numerics

### Examination arrangement

Examination arrangement: School exam

Evaluation Weighting Duration Grade deviation Examination aids
School exam 100/100 4 hours D

### Course content

The course consists of two parts: Introduction to procedure-oriented programming in Python (2/3) and Numerics (1/3). The Python skills will be generally applicable to many different problems, but as soon as the level is high enough, most of the examples will be directed towards problem-solving in the Numerics domain. Procedure-oriented programming: - Variables and data types. - Input and output. - Control structures: Sequence, conditional program flow and repetitions. - Structuring and modularisation of programs; functions and modules. - Data structures: Lists, tables, text strings, sets, tuples and dictionaries. - Persistent storage of data, file input and output, and exceptions. - Recursion. - Python as a programming environment. - Computation of N-dimensional matrixes - Plot of functions. Numerics: - Numeric Integration of Functions: Trapezoidal rule, Simpson's rule, Adaptive Simpson's rule - Newton's method for finding zeros of a real-valued function - Gaussian elimination for solving systems of linear equations - Numerical solution of ordinary differential equations - Fixed-point iteration

### Learning outcome

Knowledge: By the end of the course, the candidate can - explain central concepts and mechanisms of procedural programming - derive the result of small programs and functions - explain number representation, precision of calculations, and the workings of central numerical methods Skills: By the end of the course, the candidate can - use relevant tools for editing and running Python code - use viable data structures, control structures and decomposition in functions and modules to make well-structured, working code - apply some central numerical methods to solve calculation problems, and import and use numerical library functions in Python - identify causes for errors and lack of precision in programs, and correct the errors

### Learning methods and activities

Lectures, exercise lectures, mandatory exercises.

• Exercises

### Further on evaluation

The exam will only be given in English; students can answer in Norwegian.

The minimum requirement to be allegeable to take the exam is passing the assignments.

Resit exam in August. The re-sit exam may be changed to an oral exam.

### Course materials

Announced at the start of semester.

### Credit reductions

Course code Reduction From To
TDT4109 5.0 AUTUMN 2019
TDT4105 5.0 AUTUMN 2019
TDT4110 5.0 AUTUMN 2019
TDT4111 5.0 AUTUMN 2022
IT1001 5.0 AUTUMN 2023
More on the course
Facts

Version: 1
Credits:  7.5 SP
Study level: Second degree level

Coursework

Term no.: 1
Teaching semester:  AUTUMN 2023

Term no.: 1
Teaching semester:  SPRING 2024

Language of instruction: English

Location: Trondheim

Subject area(s)
• Numerical Mathematics
• Numerical Mathematics
• Technological subjects
Contact information
Course coordinator: Lecturer(s):

Department of Computer Science

# Examination

#### Examination arrangement: School exam

Term Status code Evaluation Weighting Examination aids Date Time Examination system
Autumn ORD School exam 100/100 2023-12-21 09:00
Spring ORD School exam 100/100
Summer UTS School exam 100/100
• * The location (room) for a written examination is published 3 days before examination date. If more than one room is listed, you will find your room at Studentweb.
Examination

For more information regarding registration for examination and examination procedures, see "Innsida - Exams"

More on examinations at NTNU