Challenge: Working with the While Loop
Oppgave
Swipe to start coding
-
Create a variable named
iand set it to1. -
Begin a
whileloop that runs for numbers from1to9(inclusive). Inside the loop, do the following:- Print the square of
i; - Increment
iby1.
- Print the square of
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 5. Kapittel 2
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Suggested prompts:
Oppsummer dette kapittelet
Explain code
Explain why doesn't solve task
Awesome!
Completion rate improved to 1.64
Challenge: Working with the While Loop
Sveip for å vise menyen
Oppgave
Swipe to start coding
-
Create a variable named
iand set it to1. -
Begin a
whileloop that runs for numbers from1to9(inclusive). Inside the loop, do the following:- Print the square of
i; - Increment
iby1.
- Print the square of
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 5. Kapittel 2
single