Python Program:

- To print Odd numbers between 0 to N

Example:

User Input: 8

Output: 1 3 5 6 7

num=int(input("Enter your last number : "))
print("Your even numbers are :",end=" ")

for i in range(1,num) :
  if i%2!=0 :
    print(i, end=" ")

Output:

  Enter your last number : 6
  Your odd numbers are : 1 3 5
Program
basic

You should know first :

Odd numbers: Numbers not perfectly divisible by 2

 number % 2 != 0 

So, we are using a for loop till the last number entered and check every value for odd

for i in range(1,num) :
  # Check every 'i' for odd, if odd then print
Concept

Coming Soon !

Quick
Tutorial

Quote

The best preparation for good work tomorrow is to do good work today.