Python program to print all odd numbers from m to n using for loop

0
40
lower_limit = int(input("Enter the start of range: ")) 
upper_limit = int(input("Enter the end of range: ")) 
for num in range(lower_limit, upper_limit + 1): # iterating each number in list 
   if num % 2== 1: # checking condition because odd numbers are not divisible by 2 
     print(num, end = " ") 

    Output:
           Enter the start of range: 17
           Enter the end of range: 31
           17 19 21 23 25 27 29 31 

इन्हें भी देखें।

Python Programs के लिये यहाँ click करें।

 

Python program to print all odd numbers from m to n using for loop program to print all odd numbers from m to n using for loop in python write a program to print all odd numbers from m to n using for loop write a program to print all odd numbers from m to n using for loop in python odd number program odd number program using loop write a program to find odd number using for loop program to find odd numbers in given range

Python program to print all odd numbers in a range

LEAVE A REPLY

Please enter your comment!
Please enter your name here