Print Odd Numbers Within a Given Range in python

Share on facebook
Share on twitter
Share on pinterest

In this Basic Python Program, we will have a look at How to “print odd numbers” with the help of Python Programming Language.

Python Program TO Priint Odd Numbers

start, end = 4, 19

# iterating each number in list 

for num in range(start, end + 1): 

# checking condition 

if num % 2 != 0: 

print(num, end = " ") 

In the above program, we have printed all the Odd Numbers within a given range.



Subscribe to our Newsletter

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

Share this post with your friends

Share on facebook
Share on google
Share on twitter
Share on linkedin

Leave a Reply

Your email address will not be published. Required fields are marked *