1.

To print first n odd no.s in descending order using for loop in python

Answer» n = int(input("Enter Number :"))for i in range(n - 1, -1, -1): a = 1 + i * 2 print("List is :", a)Output:Enter Number :5List is : 9List is : 7List is : 5List is : 3List is : 1


Discussion

No Comment Found