Informatics Practices
WAP to display even numbers between 10 and 20.
Python Control Flow
6 Likes
Answer
for num in range(10, 21):
if num % 2 == 0:
print(num)Output
10
12
14
16
18
20
Answered By
5 Likes
Related Questions
Write the output of the following program on execution if x = 50:
if x > 10: if x > 25: print ( 'ok' ) if x > 60: print ( 'good' ) elif x > 40: print ( 'average' ) else: print ('no output')Write the output of the following code:
for i in range (2) : for j in range (1) : if i+2 == j: print ("+",end=" ") else: print ("o",end=" ")WAP to perform all the mathematical operations of a calculator.
WAP to convert binary number to decimal number.