English

Write the while loop to print the following series: 100, 98, 96, ...2

Advertisements
Advertisements

Question

Write the while loop to print the following series:

100, 98, 96, ...2

Code Writing
Advertisements

Solution

i = 100
while i >= 2:
    print(i, end=", ")
    i -= 2
shaalaa.com
  Is there an error in this question or solution?
Chapter 1: Review of Phython - EXERCISE [Page 24]

APPEARS IN

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

Englishहिंदीमराठी


      Forgot password?
Use app×