ungleich-learning-circle/youngjin.han/python-the-hard-way/ex30.py

29 lines
981 B
Python
Raw Normal View History

2020-05-27 13:53:32 +00:00
people = 3 # define a value
cars = 4 # define a value
trucks = 1 #define a value
if cars > people: # test a criteria
print("We should take the cars.") # print a script
elif cars < people: # test a criteria
print("We should not take the cars.") # print a script
else: # test a criteria
print("We can't decide.") # print a script
if trucks > cars: # test a criteria
print("That's too many trucks.") # print a script
elif trucks < cars: # test a criteria
print("Maybe we could take the trucks.") # print a script
else: # test a criteria
print("We still can't decide.") # print a script
if people > trucks: # test a criteria
print("Alright, let's just take the trucks.") # print a script
else: # test a criteria
print("Fine, let's stay home then.") # print a script
if cars > people or trucks < cars: # test a criteria
print("There are a lot of cars") # print a script
else: # test a criteria
print("There are a few cars") # print a script