Looping
Statement Test 3
Q1. Convert the following while loop into for loop and also find the
output.
S. No. |
CODE |
OUTPUT |
a. |
x=5 while(x<15): print(x**2) x+=3 |
|
b. |
a=7 b=5 while(a<9): print(a+b) a+=1 |
|
c. |
b=5 while(b<9): print("H") b+=1 |
|
d. |
b=15 while(b>9): print("Hello") b=b-2 |
|
e. |
x=15 while(x==15): print("Hello") x=x-3 |
|
Indeed, useful blog.
ReplyDeleteThe worksheets has variety of questions
Thankyou so much for your appreciation. Subscribe and Share with your friends and students.
Delete