Write a program to display all 3 digit odd numbers.
Advertisements
Question
Write a program to display all 3 digit odd numbers.
Short/Brief Note
Advertisements
Solution
Odd Number (3 digits)
for a in range (100, 1000)
if a % 2 = = 1:
print b
Output:
101, 103, 105, 107, .. …… 997, 999
shaalaa.com
Control Structure
Is there an error in this question or solution?
APPEARS IN
RELATED QUESTIONS
How many important control structures are there in Python?
Elif can be considered to be the abbreviation of ______.
Which is the most comfortable loop?
What is the output of the following snippet?
i=1
while True:
if i%3 ==0:
break
print(i,end='')
i +=1
Write a note on the break statement.
Write a note on if..else structure.
Using if..else..Elif statement writes a suitable program to display the largest of 3 numbers.
Write the syntax of the while loop.
Write a detail note on for loop?
Write a detailed note on if..else..elif statement with suitable example.
