Question: 1. Modify the following code to get the desired output Code - n=1 while n
1. Modify the following code to get the desired output
Code - n=1 while n <=10: a=100 a=a+n print("n =",n," ","a =",a) n=n+1
Desired output ---- n = 1 a = 1 n = 2 a = 1 n = 3 a = 1 n = 4 a = 1 n = 5 a = 1 n = 6 a = 1 n = 7 a = 1 n = 8 a = 1 n = 9 a = 1 n = 10 a = 1
2. Get following output using while loop.
Question 3. Get the following output using while loop
Hint**: Decide how many times you want o to run the loop and starting point of your loop
4. Get the following output.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
