Page 102 - Gujrati Play V2.0 Class 7 Flipbook
P. 102
WÃkhkuõík «kuøkúk{ hLk fhðkÚke, ykÃkýLku Lke[u {wsçkLkwt ykWxÃkwx {¤u Au:
Output
How many days are there in a leap year? 366
Your answer is correct, Good Job
How many days are there in a leap year? 365
if...else... Mxux{uLx
if…else Mxux{uLx þhík {kxu íkÃkkMk fhu Au. òu þhíkLkwt {qÕÞktfLk Mkk[wt ÚkkÞ Au, íkku òu Mxux{uLx ÃkAeLkku RLzuLxuz ç÷kuf yuÂõÍõÞwx ÚkkÞ Au,
yLÞÚkk, else Mxux{uLx ÃkAeLkku RLzuLxuz ç÷kuf yuÂõÍõÞwx ÚkkÞ Au. if…else Mxux{uLxLkku rMkLxuõMk Lke[u ykÃku÷ Au:
ðkõÞh[Lkk:
if (Test Expression):
Indented block
else:
Indented block
Start
if condition
False
True
Statements in else
Statements in if
block execute
block execute
Stop
«kuøkúk{ 3: çku MktÏÞkykuLke Mkh¾k{ýe fhðk yLku Ãkrhýk{ AkÃkðk {kxu.
Program3.py
File Edit Format Run Options Window Help
#Program to compare two numbers using if else statement
a = int(input('Enter the first number: '))
b = int(input('Enter the second number: '))
if(a > b):
print('First number is greater than second number')
else:
print('Second number is greater than first number')
100 Play (Ver. 2.0)-VII

