You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Use of 'while-loop' for printing consecutive numbers
'''
# print all the numbers from 1 to 20
# Three compulsory components of a 'while-loop'-
i = 1 # Initialization
while i <= 20 : # Conditions
print(i)
i = i + 1 # Update
# Notice that the 'print()' is typed above the 'update' here, because every times the 'print()' is done with printing a number, the 'update' then again starts working on the next number of the order to be printed; which continues untill the 'condition' is meet.
'''
# Use of 'for-loop' for printing consecutive numbers