Write a Python program to print all odd number between 1 to 100.

SOLUTION....

# Program to print all odd numbers between 1 to 100

for i in range(1, 101):   # loop from 1 to 100
    if i % 2 != 0:        # check if number is odd
        print(i, end=" ")

OUTPUT

Leave a Reply

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

sign up!

We’ll send you the hottest deals straight to your inbox so you’re always in on the best-kept software secrets.