Challenge: Working with the While Loop
Task
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
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 5. ChapterΒ 2
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Suggested prompts:
Summarize this chapter
Explain the code in file
Explain why file doesn't solve the task
Awesome!
Completion rate improved to 1.64
Challenge: Working with the While Loop
Swipe to show menu
Task
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
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 5. ChapterΒ 2
single