Answers for "if statement in python with multiple conditions"

0

how to add multiple if statements in python

var = 100
if var < 200:
   print "Expression value is less than 200"
   if var == 150:
      print "Which is 150"
   elif var == 100:
      print "Which is 100"
   elif var == 50:
      print "Which is 50"
   elif var < 50:
      print "Expression value is less than 50"
else:
   print "Could not find true expression"

print "Good bye!"
Posted by: Guest on June-03-2021

Code answers related to "if statement in python with multiple conditions"

Python Answers by Framework

Browse Popular Code Answers by Language