Programming without a computer: what does it mean for 1P and 2P?
If you are taking 1P or 2P, this is a small part of the 2027 change. Programming is not a competence aim of its own in either subject, and the coding tasks in the exam have usually asked you to read and explain a program. Many of them have been on part 1, where you have never had a computer.
Here is what actually becomes harder, what we do not know yet, and how to practise reading code without a machine to correct you.
Last updated . Sources: the Norwegian Directorate for Education and Training (Udir) and the curricula for mathematics 1P and mathematics 2P (both in Norwegian).
Programming in 1P and 2P
None of the competence aims in 1P or 2P mention programming. Even so, programming is part of the curriculum for both subjects. It is one of the digital skills, together with graph plotters, spreadsheets and CAS, and the curriculum counts algorithmic thinking as part of problem solving. Udir itself says that programming and algorithmic thinking are part of the curriculum in the maths subjects.
Programming is a tool in 1P and 2P, not a topic of its own. That is why code turns up in the exam wrapped around something else: savings that grow by a growth factor, emissions that have to come down by a fixed percentage every year, a mean or simultaneous equations. Many of the tasks are at least as much about the growth factor as about the code.
The coding tasks have already been paper tasks
Every 1P and 2P paper from 2022 to 2026 has at least one task with programming. In most of the papers from 2024 onwards it is on part 1, where you only have writing materials and a ruler. There you have had to read the code and answer in pen.
The same kinds of question come up in paper after paper:
- Give a practical interpretation of a line in the code.
- What does the person want to find out with the program?
- What do the values that are printed tell you? Often the output is already given in the task.
- Make a list of the numbers that are printed when the program runs.
- What changes need to be made to the program to solve a new problem?
None of these need a machine. They need you to be able to follow the code line by line and explain what the numbers mean. You will find an example with a full trace in my worked solution to the 1P exam from autumn 2025, part 1, task 7 (in Norwegian).
In the papers from 2024 onwards, the coding tasks have only asked you to read, interpret or change a program, never to write a new one from scratch. That is an observation about the exams so far, not a prediction about 2027.
What becomes difficult without a computer
Today you can write and run a program on the computer on part 2. The exam guidance then asks you to attach a screenshot of both the code and the result of running it. From spring 2027 that will no longer be possible.
In some of the papers from 2022 and 2023, part 2 asked you to write or change a program and use it to find the answer, for example how many months it takes to pay off a loan. Writing the code is fine on paper. You only get the answer by running the program, or by working through every single round yourself.
The sample papers from 16 October 2026 answer this. For 1P and 2P, Udir says that you may for example be asked to interpret program code, put lines of code in the right order, suggest changes to code or explain how a program works. Writing a whole program yourself is not mentioned for 1P and 2P. In R1 and S1 you may also be asked to write a program, and there small syntax errors normally count for little.
If you are in year 10
At lower secondary, programming is part of the competence aims, and the curriculum that applies from autumn 2026 says that after year 10 you should be able to read and explain program code in Python. Udir wrote on 3 November 2026 that the permitted material in year 10 does not change. The method below is just as useful for you.
How to practise reading code without a computer
Without a machine you have to run the code yourself, on paper. The method is a trace table: one column for each variable and one row for each round of the loop.
- Write the starting values in the first row.
- Check the condition before each round, and write down whether it is true.
- Carry out the lines in the loop in order, and write the new values in the next row.
- When the condition is no longer true, the loop stops. Then the lines after it run.
An example
The program below works with a number that starts at 3 and doubles every hour.
count = 3
hours = 0
while count < 100:
count = count * 2
hours = hours + 1
print(hours)
print(count)
| Round | Check before the round | count |
hours |
|---|---|---|---|
| Start | â | 3 | 0 |
| 1 | 3 < 100, yes | 6 | 1 |
| 2 | 6 < 100, yes | 12 | 2 |
| 3 | 12 < 100, yes | 24 | 3 |
| 4 | 24 < 100, yes | 48 | 4 |
| 5 | 48 < 100, yes | 96 | 5 |
| 6 | 96 < 100, yes | 192 | 6 |
| Stop | 192 < 100, no | 192 | 6 |
Notice round 6. The count is 96, which is still under 100, so the loop runs one more round. Only when the count is 192 is the condition no longer true, and the loop stops. The program prints 6 and 192: after 6 hours the count has reached 100 or more for the first time, and it is then 192. You can check with the growth factor: 3 · 2ⶠ= 192.
What you need to be able to read in Python
The coding tasks in 1P and 2P are written in Python, and you only need a small part of the language.
while count < 100:repeats the indented lines below it as long as the condition is true. The condition is checked before each round. Aprintwithout indentation after the loop runs once, when the loop has finished.for x in range(1, 5):goes through x = 1, 2, 3 and 4. The last number is not included.count = count * 2is not an equation. It means: take the valuecounthas now, multiply by 2, and make that the new value.==asks whether two things are equal, for exampleif f(x) == g(x):.**means "to the power of".0.975 ** xis 0.975 to the power of x.def f(x):withreturnbelow it makes a function, the way you write f(x) = ⊠in maths.- Decimal numbers are written with a point, as in English:
1.058. The Norwegian exam paper writes the same number as 1,058. - Text after
#is a comment for the reader and does nothing when the program runs.
When you have to write or change code by hand
- Write the whole line as it should look, not just the part that changes. If the code has line numbers, say which line you are changing.
- Make the indentation clear. The indentation decides what belongs to the loop, and it is easy to lose in handwriting.
- Trace the code you have written for one or two rounds. Without a computer, that is the only check you have that it does what you want.
The rest of part 2 without a computer is about calculation. You will find that on the page about part 2 by hand.
What the sample papers show
Both the 1P and the 2P set from 16 October 2026 have coding tasks where the program is already written, and you see the result next to it. In 1P you have to explain how a program finds the speed that gives the lowest emissions, and suggest changes that could give a more accurate answer. In 2P you have to explain what the values printed by the program tell you, and how the program arrives at them. Both sets also have a task where you explain how a program works out when emissions have been halved.
None of the coding tasks in the 1P and 2P sets ask you to write a program from scratch. Reading and explaining code is what you should practise, and that is what the method above is about. The sets are in Udir's exam database.
More guides on the 2027 exam changes
- Is your calculator allowed? Eight things you can check yourself, on the one you have or before you buy
- Using the calculator key sequences for standard deviation, powers and nth roots on common models
- Part 2 by hand what disappears in 1P and 2P, and which skills you should practise now
If you have questions about how the coding tasks already affect you, get in touch. The rest of what changes in 2027 is on the overview page for the 2027 exam changes.