Python Program to print first n odd numbers in descending order
In this program, You will learn how to print first n odd numbers in descending order in Python.
for i in range(start, end):
#statement
Example: How to print first n odd numbers in descending order in Python.
n = int(input("Enter a number:"))
for i in range(n - 1, -1, -1):
a = 1 + i * 2
print("List are:", a)
Output:
Enter a number:10
List are: 19
List are: 17
List are: 15
List are: 13
List are: 11
List are: 9
List are: 7
List are: 5
List are: 3
List are: 1