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?
Which amongst this is not a jump statement?
Which punctuation should be used in the blank?
if<condition>_
statement-block 1
else:
statement-block 2
Write a program to display.
A
A B
A B C
A B C D
A B C D E
Write a note on if..else structure.
Write the syntax of the while loop.
List the differences between break and continue statements.
Write a detail note on for loop?
