Write a python script to print first N odd natural numbers in reverse order

 #Write a python script to print first N odd natural numbers in reverse order

a=int(input("Enter the number"))
i=1
while a>=i:
    if a%2!=0:
        print(a)
    a-=1

Comments

Popular posts from this blog

Write a python script to display the current date and time. First create variables to store date and time, then display date and time in proper format (like: 13-8-2022 and 9:00 PM """