Challenge: Working with the While Loop
Opgave
Swipe to start coding
-
Create a variable named
i
and set it to1
. -
Begin a
while
loop that runs for numbers from1
to9
(inclusive). Inside the loop, do the following:- Print the square of
i
; - Increment
i
by1
.
- Print the square of
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 5. Kapitel 2
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat
Awesome!
Completion rate improved to 1.64
Challenge: Working with the While Loop
Stryg for at vise menuen
Opgave
Swipe to start coding
-
Create a variable named
i
and set it to1
. -
Begin a
while
loop that runs for numbers from1
to9
(inclusive). Inside the loop, do the following:- Print the square of
i
; - Increment
i
by1
.
- Print the square of
Løsning
Var alt klart?
Tak for dine kommentarer!
Awesome!
Completion rate improved to 1.64Sektion 5. Kapitel 2
single