Introduction to Programming and Numerical Analysis

Course content

This course introduces you to programming and enables you to numerically solve simple economic models and perform basic data analysis. This will e.g. allow you to both visualize solutions, easily test assumptions with respect to functional forms and parameters, and consider more realistic models, which are solvable numerically but not algebraically.  


The first part of the course introduces you to programming using the general-purpose Python language. You will learn to write conditional statements, loops, functions, and classes, and to print results and produce static and interactive plots. You will learn to solve simple numerical optimization problems, and draw random number and run simulations. You will learn to test, debug and document your code, and use online communities proactively when writing code.


The second part of the course gives you a brief introduction on how to import data from offline and online sources, structure it, and produce central descriptive statistics. You will learn to estimate simple statistical models on your data.


The third part of the course introduces you to the concept of a numerical algorithm. You will learn how to write simple searching, sorting and optimization algorithms. You will learn to solve linear algebra problems, solve non-linear equations numerically and symbolically, find fixed points, and solve complicated numerical optimization problems relying on function approximation.


You will get hands-on experience with applying the above techniques to solve well-known microeconomic and macroeconomic problems from the core bachelor courses. Specifically, you will work with both a small data analysis project, and a larger model analysis project based on a well-known economic model.


While the course only focus on programming in Python, you will also be equipped to start learning other programming languages (such as MATLAB, R, Julia or even C/C++) on your own.


We focus on you getting hands-on programming experience right from the start of the course. To this end, you will get access to the online learning platform DataCamp. On DataCamp, you will solve programming exercises and be able to view additional instructional videos, which will be helpful for your advancement in the learning outcomes.”


MSc programme in Economics – elective course

Bacheloruddannelsen i økonomi – valgfag fra 2. år

The Danish BSc programme in Economics - elective from the 2nd year.


The course is open to:

  • Exchange and Guest students from abroad
  • Credit students from Danish Universities
  • Open University students
Learning outcome

After completing the course, the student is expected to be able to:



  • Describe the differences between data types (e.g.  strings, booleans, integers and floats)
  • Describe the differences between data containers (e.g. lists, dicts and arrays)
  • Explain the use of conditionals (if-elseif-else)
  • Explain the use of loops (for, while, continue, break)
  • Explain the use of functions, methods and classes
  • Describe the difference between views and copies of objects
  • Explain how to use (pseudo) random numbers
  • Explain the notation of numerical algorithms



  • Setup a Python enviroment
  • Write Python scripts, functions and notebooks
  • Apply error handling and debugging techniques
  • Use and write code documentation
  • Print results and make static and interactive plots
  • Import and export of data from and to csv, excel and online databases
  • Perform simple descriptive analysis  of numerical data
  • Use numerical equation solvers and symbolic equation solvers
  • Use numerical optimizers
  • Formulate numerical algorithms from mathematical problems
  • Solve mathematical problems numerically
  • Solve well-known economic problems numerically
  • Perform numerical simulation of stochastic models



  • Work collaboratively on code projects
  • Use online communities to find existing code and get help
  • Present and discuss results of a numerical analysis
  • Learn new programming tools and languages

A combination of lectures, online tutorials, classes, and group-based project work/assignments.

Courses similar to Economic Principles A, Economic Principles B, Mathematics A and Mathematics B at the Bachelor Programme in Economics, University of Copenhagen.

The course also draws on material from "Probability Theory and Statistics", Microeconomics I and Macroeconomics I, which therefore all courses at the Study of Economics, University of Copenhagen, (or similar courses) should either be followed simultanously or have been followed befor taken the programming course.

The course requires no prior experience with programming.

2 hours lectures once a week from week 6 to 20
2 hours of execise classes once a week from week 6/7 to 20

The overall schema for Master courses can be seen at KUnet:
MSc in Economics => "courses and teaching" => "Planning and overview" => "Your timetable"
BA i Økonomi/KA i Økonomi => "Kurser og undervisning" => "Planlægning og overblik" => "Dit skema"

Timetable and venue:
To see the time and location of lectures and exercise classes please press the link/links under "Timetable"/​"Se skema" at the right side of this page (F means Spring).

Please be aware:
- The study administration allocates the students to the exercise classes according to the principles stated in the KUnet.
- If too many students have wished a specific class, students will be registered randomly at another class.
- It is not possible to change class after the second registration period has expired.
- If there is not enough registered students or available teachers, the exercise classes may be jointed.
- The student is not allowed to participate in an exercise class not registered.
- The teacher of the exercise class cannot correct assignments from other students than the registered students in the exercise class except with group work across the classes.
- All exercise classes are taught in English and it is expected that the students ask questions in English, so foreign students are included in the dialog.
- The schedule of the lectures and the exercise classes can change without the participants´ acceptance. If this occur, you can see the new schedule in your personal timetable at KUnet, in the app myUCPH and through the links in the right side of this course description and at the link above.
- It is the students´s own responsibility continuously throughout the study to stay informed about their study, their teaching, their schedule, their exams etc. through the curriculum of the study programme, the study pages at KUnet, student messages, the course description, the Digital Exam portal, Absalon, the personal schema at KUnet and myUCPH app etc.



The student will receive:

  • written and oral feedback from the teaching assistants on all the projects
  • written peerfeedback on the data and model analysis projects
7,5 ECTS
Type of assessment
Portfolio, 48 hours
Type of assessment details
The exam is a written assignment consisting of two parts:
• Part 1: The first part is based on the three mandatory assignments worked with during the semester. Students can use the peer feedback received during the semester to improve these assignments. This can be done before the exam period begins.
• Part 2: The second part is a new assignment given in English. The new assignment correspond to approximately a 24 hours assignment.

Please be aware that:
• The new assignment can be written individually or by groups of maximum three students.
• The plagiarism rules and the rules for co-written assignments must be complied.
• All parts must be answered in English and all parts must be uploaded to Digital Exam in one file.
• Part 1 and Part 2 weighs respectively 40% and 60% in the final pass/fail grade.
Exam registration requirements

To qualify for the exam the student must no later than the given deadlines during the course:

  • Complete a basic programming test.
  • Hand in 3 out of 3 mandatory assignments to be appoved.
  • Provided useful written peer feedback based on specific criteria for a minimim of 2 out of the 3 mandatory assignments from other groups.


Please be aware of:

  • The teaching assistants and/or the lecturer control the feedback.
  • The assignments can be written individually or by groups of maximum three students. The peer feedback is group-to-group and must be substantive (suggest improvements, solve or spot errors).
  • The plagiarism rules and the rules for co-written assignments must be complied.
  • The assignments and the peer feedback must be written in English.
  • The mandatory assignments and the peer feedback are part of a portfolio exam. See “Type of assessment”
All aids allowed

All aids allowed for the written exam.

Use of AI tools, such as ChatGPT, is allowed.



Grading of the exam:

Exchange students must be aware, that the assessors and the University are not allowed in any way to reward a student with a grade of numerically or alphabetically value. The course and the exam will only be rewarded with a grade of

Marking scale
passed/not passed
Censorship form
No external censorship
at the written exam.
Exam period

Exam information:

Examination Dates can be found here

More information is available in Digital Exam from the middle of the semester. 

More information about examination, rules, aids etc. at Master(UK), Master(DK) and Bachelor(DK).


Same as the ordinary exam.

Reexam information:

More information in Digital Exam in August. 

More info: Master(UK), Master(DK) and Bachelor.

Criteria for exam assessment

Students are assessed on the extent to which they master the learning outcome for the course.


The final exam tests the students' knowledge, skills, and competencies as described in the course learning outcomes. In order to obtain the grade “Pass”, the student must demonstrate that the knowledge, skills and competencies listed in the learning outcomes are met in a satisfactory way.

Single subject courses (day)

  • Category
  • Hours
  • Lectures
  • 42
  • Class Instruction
  • 28
  • Preparation
  • 112
  • Exam
  • 24
  • English
  • 206


Course number
7,5 ECTS
Programme level
Full Degree Master

1 semester

- Go to 'Signup' for information about registration and enrollment.

Information about admission and tuition fee: Master and Exchange Programme, credit students and guest students (Open University)

and venue:
- For teaching: Go to 'Remarks'.
- For exam and re-sits: Go to 'Exam'.
Department of Economics, Study Council
Contracting department
  • Department of Economics
Contracting faculty
  • Faculty of Social Sciences
Course Coordinators
  • Jeppe Druedahl   (14-6d68737368316775786867646b6f4368667271316e7831676e)
  • Asker Nygaard Christensen   (3-69766b486d6b777636737d366c73)

Lectures: See ‘Course Coordinators’

Teachers at exercise classes:
Exercise class 1:
Exercise class 2:
Exercise class 3:
Exercise class 4:
Exercise class 5:
Exercise class 6:
Exercise class 7:
Exercise class 8:

Please read "Remarks" regarding the schedule of the teaching.

Saved on the 21-05-2024

Are you BA- or KA-student?

Are you bachelor- or kandidat-student, then find the course in the course catalog for students:

Courseinformation of students