elif statement

PHOTO EMBED

Mon Mar 30 2020 12:04:52 GMT+0000 (Coordinated Universal Time)

Saved by @bambifruit #python #python #ifstatement #elifstatement #elsestatement #comparisonoperators

1.People = 30
2.Cars = 40
3. Trucks = 14
     # line 1,2,3 assign the value to variables
4.If cars > people: #Using if statement
   5.Print(“we should take the  cars.”)
6.Elif cars < people: #if 1st is false execute elif
     7.print(“we should not take the car.”)
8.else : # if both are false then execute else:
          9.print(“we can’t decide.”)
content_copyCOPY

Lines after # are comments.

https://www.amazon.com/Learn-Python-Hard-Way-Introduction/dp/0321884914