English

Rewrite the following for loop into while loop. for a in range(90,9,-9): print a

Advertisements
Advertisements

Question

Rewrite the following for loop into while loop.

for a in range(90,9,-9):
    print a
Code Writing
Advertisements

Solution

a = 90
while a > 9:
    print(a)
    a -= 9
shaalaa.com
  Is there an error in this question or solution?
Chapter 1: Review of Phython - EXERCISE [Page 25]

APPEARS IN

CBSE Computer Science with Python [English] Class 12
Chapter 1 Review of Phython
EXERCISE | Q 5. b) | Page 25
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×