Challenge: Printing a Sequence
Task
Swipe to start coding
Write a program that generates the first ten even numbers.
Follow these loop parameters exactly:
- Initialization: start
iat1. - Condition: continue while
i <= 10. - Update: increase
iby1each iteration.
Inside the loop:
- Multiply
i * 2. - Store the result in an array.
- Return the full sequence.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 6. ChapterΒ 2
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 1.35
Challenge: Printing a Sequence
Swipe to show menu
Task
Swipe to start coding
Write a program that generates the first ten even numbers.
Follow these loop parameters exactly:
- Initialization: start
iat1. - Condition: continue while
i <= 10. - Update: increase
iby1each iteration.
Inside the loop:
- Multiply
i * 2. - Store the result in an array.
- Return the full sequence.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 6. ChapterΒ 2
single