Answers for "how to give give two conditions in one if statement python"

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 "how to give give two conditions in one if statement python"

Python Answers by Framework

Browse Popular Code Answers by Language