Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

while loop odd numbers python

# Python Program to Print Odd Numbers from 1 to N

maximum = int(input(" Please Enter the Maximum Value : "))

number = 1

while number <= maximum:
    if(number % 2 != 0):
        print("{0}".format(number))
    number = number + 1
Source by www.tutorialgateway.org #
 
PREVIOUS NEXT
Tagged: #loop #odd #numbers #python
ADD COMMENT
Topic
Name
3+9 =