course-details-portlet

TDT4127

Programming and Numerics

Assessments and mandatory activities may be changed until September 20th.

Credits 7.5
Level Second degree level
Course start Autumn 2025 / Spring 2026
Duration 1 semester
Language of instruction English
Location Trondheim
Examination arrangement School exam

About

About the course

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.
  • demonstrate and explain your own program code to others.

Learning methods and activities

Lectures, exercise lectures, mandatory exercises.

Compulsory assignments

  • Exercises

Further on evaluation

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

The minimum requirement to be eligible 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
TDT4109 5 sp Autumn 2019
TDT4105 5 sp Autumn 2019
TDT4110 5 sp Autumn 2019
TDT4111 5 sp Autumn 2022
IT1001 5 sp Autumn 2023
INFT1010 5 sp Autumn 2024
This course has academic overlap with the courses in the table above. If you take overlapping courses, you will receive a credit reduction in the course where you have the lowest grade. If the grades are the same, the reduction will be applied to the course completed most recently.

Subject areas

  • Numerical Mathematics
  • Numerical Mathematics
  • Technological subjects

Contact information

Course coordinator

Lecturers

Department with academic responsibility

Department of Computer Science

Examination

Examination

Examination arrangement: School exam
Grade: Passed / Not Passed

Ordinary examination - Autumn 2025

School exam
Weighting 100/100 Examination aids Code D Date 2025-12-18 Time 09:00 Duration 4 hours Exam system Inspera Assessment
Place and room for school exam

The specified room can be changed and the final location will be ready no later than 3 days before the exam. You can find your room location on Studentweb.

Sluppenvegen 14
Room SL110 turkis sone
10 candidates
Room SL110 hvit sone
14 candidates
Room SL311 lyseblå sone
96 candidates
Room SL311 brun sone
19 candidates
Room SL310 blå sone
33 candidates
Room SL210
17 candidates
Room SL310 hvit sone
46 candidates
Room SL310 lilla sone
50 candidates

Ordinary examination - Spring 2026

School exam
Weighting 100/100 Examination aids Code D Duration 4 hours Exam system Inspera Assessment Place and room Not specified yet.

Re-sit examination - Summer 2026

School exam
Weighting 100/100 Examination aids Code D Duration 4 hours Exam system Inspera Assessment Place and room Not specified yet.