Write a program to print reverse counting from 10 to 1 using while loop in Python

 Write a program to print reverse counting from 10 to 1 using while loop in Python



 * Write a program to print reverse counting from 10 to 1 using while loop in Python
Ans=> 


i=10
while(i>=1):
    print(i)
    i=i-1

 

Write a program to print reverse counting from 10 to 1 using for loop in Python
Ans=>

for i in range (10,0,-1)
print(i)

 

Write a program to print numbers 1 to 100 using for loop in Python
Ans=>

for i in range (1,101)
print(i)

 
Write a program to print numbers 1 to 100 using while in Python
Ans=>

i=1
while(i<=100):
    print(i)
    i=i+1

 

 

Post a Comment

0 Comments