Ad Code

Write a program to print the numbers from 20 to 1 using a loop

 Write a program to print the numbers from 20 to 1 using a loop.

Code:

for num in range(20, 0, -1):

    print(num)

    

print("or")


num = 20

while num >= 1:

    print(num)

    num -= 1


Reactions

Post a Comment

0 Comments