IFELSE IN PYTHON
ALL ABOUT IF-ELSE IN PYTHON THIS IS CODE OF IF-ELSE IN PYTHON YOU CAN COPY PASTE THIS CODE AND RUN AND SEE THE OUTPUT IN THIS CODE I HAVE COVER ALMOST WORK RELATED TO IF-ELSE. ''' Equal : a==b not equal: a!=b less than: a<b greater than :b>a greater than or equal to :a>=b less than equal to: a<=b ''' # if statement a = 33 b = 200 if b > a : print ( "b is geater than a" ) # # elif a = 33 b = 33 if b > a : print ( "b is greater than a" ) elif a == b : print ( "a and b are equal" ) # # ELSE a = 200 b = 33 if b > a : print ( "b is greater than a" ) elif a == b : print ( "a is greater than b" ) else : print ( "a is greater than b" ) # # SHORT HAND IF a = 300 b = 30 if a > b : print ( "a is greater than b " ) # # SHORT HAND IF ELSE a = 2 b = 330 print ( "A" ) if a > b else print ( "B" )