Write a python program to print all odd number upto a given range.

 code:-

r=int(input(“Enter range”))
for i in range(1,r+1,2):
print(i,end=” “)

Output:-

Enter range50
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49



One thought on “Write a python program to print all odd number upto a given range.

Leave a Reply

Your email address will not be published.