Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære With broken test | First Section
Explain Unit test on grid chapter

Stryg for at vise menuen

book
With broken test

Here test broken

Opgave

Swipe to start coding

You have a list of integers stored in the variable numbers. Your task is to compute the sum of all elements in this list and assign the result to the variable total. The total variable should be of type int. You are not allowed to use the built‐in sum() function — you must implement the summation manually (e.g. with a loop). Finally, print the result in the format:

python

Løsning

Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 1. Kapitel 2
Vi beklager, at noget gik galt. Hvad skete der?

Spørg AI

expand
ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

book
With broken test

Here test broken

Opgave

Swipe to start coding

You have a list of integers stored in the variable numbers. Your task is to compute the sum of all elements in this list and assign the result to the variable total. The total variable should be of type int. You are not allowed to use the built‐in sum() function — you must implement the summation manually (e.g. with a loop). Finally, print the result in the format:

python

Løsning

Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 1. Kapitel 2
Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Vi beklager, at noget gik galt. Hvad skete der?
some-alt