Advertisements
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 statement is generally used as a placeholder?
The condition in the if statement should be in the form of ______
Which is the most comfortable loop?
What is the output of the following snippet?
T=1
while T:
print(True)
break
Which amongst this is not a jump statement?
Write a note on the break statement.
Write is the syntax of if..else statement?
Write the syntax of the while loop.
