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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!