Write a python program to find odd numbers from 21-99, by using while loop.
Answers
Answered by
0
Answer:
Input: list1 = [2, 7, 5, 64, 14]
Output: [7, 5]
Input: list2 = [12, 14, 95, 3, 73]
Output: [95, 3, 73]
Explanation:
with while loop:
# Python program to print odd Numbers in a List
# list of numbers
list1 = [10, 21, 4, 45, 66, 93]
# iterating each number in list
for num in list1:
# checking condition
if num % 2 != 0:
print(num, end = " ")
Output:
21 45 93
Similar questions