Chemistry, asked by aklimak716, 5 months ago

18. Write a program to print all odd number positive) less than 50​

Answers

Answered by AMohammedRaiyan
1

Answer:

1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49

Answered by Zoyacuteee
0

Input: start = 4, end = 15

Output: 5, 7, 9, 11, 13, 15

Input: start = 3, end = 11

Output: 3, 5, 7, 9, 11

Example #1: Print all odd numbers from given list using for loop

Define start and end limit of range. Iterate from start till the range in the list using for loop and check if num % 2 != 0. If the condition satisfies, then only print the number.

# Python program to print odd Numbers in given range

start, end = 4, 19

literating each number in list

for num in range(start, end + 1):

if num % 2 != 0:

print(num, end = " ")

Similar questions