num_range=int(input("enter range upto which you want to find odd numbers : "))

lst=[]

for i in range(1,num_range):

if not(i%2==0):

lst.append(i)

print("all odd number upto ",num_range,“are :”,lst)

1 Like

1 Like

lower = int (input(“enter the lower limit for range :”)

upper = int (input(“enter the upper limit for range :”)

for i in range(lower, upper+1)

if(i%2!=0):

print(i)

1 Like

lower=int(input(“Enter the lower limit for the range:”))

upper=int(input(“Enter the upper limit for the range:”))

for i in range(lower,upper+1):

if(i%2!=0):

print(i)

2 Likes

x=int(input(“Enter the lower limit in the range:”))

y=int(input(“Enter the upper limit in the range:”))

for i in range(x,y=1):

if(i%2!=0):

print(i)

2 Likes

Very good keep it up.