Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python print odd numberrs

# Python program to print all ODD numbers in the range[a, b]
a, b = (7, 19)

for num in range(a, b+1): # b+1 is to include b itself
  if num & 1:
    print(num, end = ' ')
# output:
# 7 9 11 13 15 17 19
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #python #print #odd #numberrs
ADD COMMENT
Topic
Name
7+6 =