[Python #5] create e29.py

This commit is contained in:
kjg 2020-05-27 21:38:55 +09:00
parent 13c38af736
commit 885832e4a2
2 changed files with 37 additions and 0 deletions

View file

@ -0,0 +1,35 @@
people = 21
cats = 33
dogs = 14
if people < cats:
print("Too many cats! The world is doomed!")
if people > cats:
print("Not many cats! The world is saved!")
if people < dogs:
print("The world is drooled on!")
if people > dogs:
print("The world is dry!")
if people != dogs:
print("People are not dogs.")
dogs += 5
if people >= dogs:
print("People are greater than or equal to dogs.")
if people <= dogs:
print("People are less than or equal to dogs.")
if people == dogs:
print("People are dogs.")

View file

@ -115,3 +115,5 @@ practice debug code
How to use True and Flase
**** ex28
How to use Boolean
**** ex29
How to use if-statement