Python Program to Print Natural Numbers in Reverse Order

In this article, we will show you, How to write a Python Program to Print Natural Numbers in Reverse Order with example.

Python Program to Print Natural Numbers in Reverse Order using While Loop

This Python program allows user to enter any integer value. Next, it will print natural numbers from user specified value to 1 using while loop.

# Python Program to Print Natural Numbers in Reverse Order
number = int(input("Please Enter any Number: "))
i = number
print("List of Natural Numbers from {0} to 1 in Reverse Order : ".format(number))
while ( i >= 1):
print (i, end = ' ')
i = i - 1

OUTPUT

Python Program to Print Reverse Order Natural Numbers Example 2

This program is same as first example. However, this time we allow user to enter minimum and maximum values. It means, this program will print natural numbers from maximum to minimum.