English

Write the while loop to print the following series: 5, 10, 15, ...100

Advertisements
Advertisements

Question

Write the while loop to print the following series:

5, 10, 15, ...100

Code Writing
Advertisements

Solution

i = 5
while i <= 100:
    print(i, end=", ")
    i += 5
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. a) | Page 24
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×