Question: Python Problem 2 Rewrite the following loops as described. (a) Write the following while loop as a for loop: 1 while i = 10: if
Python
Problem 2 Rewrite the following loops as described. (a) Write the following while loop as a for loop: 1 while i = 10: if i 5 and 1 ! print('X') (b) Write the following for loop as a while loop: for i in range (1,11, 3): print ('X') c) Write the following for loop as a while loop: for i in range (10, 100, 10): print('X') (d) Write the following while loop as a for loop: i=10 while i > 2: 1 print('X')
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
