Skip to main content

DD1331 Fundamentals of Programming 5.0 credits

Choose semester and course offering

Choose semester and course offering to see current information and more about the course, such as course syllabus, study period, and application information.


For course offering

Autumn 2024 CTFYS programme students

Application code


Headings with content from the Course syllabus DD1331 (Autumn 2024–) are denoted with an asterisk ( )

Content and learning outcomes

Course contents

Fundamental computer concepts.

Programming in a modern programming language (Python). Data structures and classes. Problem-solving through division into sub-problems. Program structuring. Several smaller programming assignments as well as one larger, individual programming assignment with strong emphasis on structuring and specification of included modules. Graphic descriptions of the connection between variable names, types and data.

Intended learning outcomes

After passing the course, the student should be able:

  • classify syntactic elements in program code with correct terminology
  • identify and apply basic data types, classes and type conversions
  • identify, apply and troubleshoot flow control as well as logical and arithmetic expressions
  • analyze the scope and extent of a variable
  • debug short programmes written by others
  • write and troubleshoot longer programmes
  • write a specification for a longer programme
  • divide a problem into manageable parts
  • divide a program into manageable parts
  • use and evaluate good programming practices
  • evaluate, troubleshoot and with correct terminology describe recursive algorithms
  • combine the embedded functions of the programming language with own functions to solve programming problems

in order to

  • be able to carry out computations and solve programming problems
  • be prepared for the next course in computer science.

For higher grades, the student should also be able to

  • implement an interactive graphical user interface.

Literature and preparations

Specific prerequisites

No information inserted

Recommended prerequisites

High school mathematics (scientific program). Some computer experience (the concepts of operating system and file, and experience from some computer application, e.g. word processing). DD1301 Computer introduction is recommended and can be read in parallel.


No information inserted


No information inserted

Examination and completion

If the course is discontinued, students may request to be examined during the following two academic years.

Grading scale

A, B, C, D, E, FX, F


  • KONT - Partial exam, 1.0 credits, grading scale: P, F
  • LAB1 - Laboratory Assignment, 2.0 credits, grading scale: P, F
  • PRO1 - Individual programming project, 2.0 credits, grading scale: A, B, C, D, E, FX, F

Based on recommendation from KTH’s coordinator for disabilities, the examiner will decide how to adapt an examination for students with documented disability.

The examiner may apply another examination format when re-examining individual students.

Opportunity to complete the requirements via supplementary examination

No information inserted

Opportunity to raise an approved grade via renewed examination

For students in a course offering that is two periods, it is possible to raise an approved grade via renewed examination until the end of the course offering. For students in a course offering that is just one period, it is possible to raise an approved grade via renewed examination until one year from the start of the course offering.


Ethical approach

  • All members of a group are responsible for the group's work.
  • In any assessment, every student shall honestly disclose any help received and sources used.
  • In an oral assessment, every student shall be able to present and answer questions about the entire assignment and solution.

Further information

Course room in Canvas

Registered students find further information about the implementation of the course in the course room in Canvas. A link to the course room can be found under the tab Studies in the Personal menu at the start of the course.

Offered by

Main field of study


Education cycle

First cycle

Add-on studies

DD1327 Fundamentals of Computer Science or DD1320 Applied Computer Science

Transitional regulations

The earlier course components LAB4, TEN2 and LAB2 have been replaced by LAB1, KONT and PRO1, respectively.

Supplementary information

In this course, the EECS code of honor applies, see: