Skip to main content

HM1007 Computer Programming 7.5 credits

Course offering missing for current semester as well as for previous and coming semesters
Headings with content from the Course syllabus HM1007 (Autumn 2007–) are denoted with an asterisk ( )

Content and learning outcomes

Course contents

  • Background, introduction to programming languages
  • Data types, variables, references
  • Operators
  • Sequence, selection, repetition
  • One- and multidimensional arrays
  • Functions, modular programming
  • Problem analysis and structure, debugging, testing
  • String operations
  • File handling

Intended learning outcomes

The course provides basic knowledge of an imperative programming language.

In order to pass, the student should be able to write structured programs in a given language, with particular focus on the following:

  • formulate simple algorithms for given problems and realise these algorithms in program code
  • use an IDE to write, execute and debug a program
  • introduce and choose data types and variables, including compound, for data storage
  • explain the difference between variable value and address/reference, and differences in memory use when storing different data types
  • write functions for well delimited assignments
  • divide problems in parts, implement and test step-by-step, by selecting appropriate test data
  • divide a program in several modules/files to promote abstraction, reusing and maintenance
  • write executable programs from a simple program design
  • use external files for data storage

For higher marks, the student shall be able to

  • analyse larger programming assignments and structure solutions on several levels, containing problem analysis, comprehensive design, well designed user interface, separation of a problem into parts, modules and functions, and implementation

Course disposition

No information inserted

Literature and preparations

Specific prerequisites

Knowledge corresponding to admission requirements for Bachelor of Science in Engineering.

Basic experience of computers.

Recommended prerequisites

No information inserted


No information inserted


The course literature is posted on the course’s homepage at least four weeks before the course starts.

The previous academic year used the following literature:

Chapman S J,  MATLAB Programming for Engineers, 3rd/4th ed. Thomson 2004/Cengage 2008.

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


  • TEN1 - Examination, 3.0 credits, grading scale: A, B, C, D, E, FX, F
  • ÖVN1 - Exercises, 4.5 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.

Other requirements for final grade

Passed written exam.
Passed computer exercises.

Opportunity to complete the requirements via supplementary examination

No information inserted

Opportunity to raise an approved grade via renewed examination

No information inserted


Profile picture Per Ahlén

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 web

Further information about the course can be found on the Course web at the link below. Information on the Course web will later be moved to this site.

Course web HM1007

Offered by

ITM/Sustainable Production Development

Main field of study

Information Technology, Technology

Education cycle

First cycle

Add-on studies

No information inserted