18. Rewrite the following code fragment using for loop: i=100 while (I>0): print(i) i-=3
Added by Vicenta J.
Step 1
Step 1: Identify the key components of the while loop: - Initialization: i = 100 - Condition: i > 0 - Body: print(i) - Update: i -= 3 Show more…
Show all steps
Close
Your feedback will help us improve your experience
Vishal Parmar and 54 other Algebra educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Rewrite the following program segment using a while loop instead of a for loop. for (i = 0; i<100; i++) { if (i % 2 == 0) { print(i) } }
Write code that iterates while userNum is less than 10. Each iteration: Put userNum to output. Then, put "/" to output. Then, assign userNum with userNum multiplied by 3.
Liam H.
Recommended Textbooks
Elementary and Intermediate Algebra
Algebra and Trigonometry
Watch the video solution with this free unlock.
EMAIL
PASSWORD