28 lines
1.2 KiB
Python
28 lines
1.2 KiB
Python
people = 21
|
|
cars = 15
|
|
trucks = 30
|
|
|
|
if cars > people: #check cars are bigger than people
|
|
print("We should take the cars.") #print if cars are bigger than people
|
|
elif cars < people: #check cars are smaller than people
|
|
print("We should not take the cars.") #print if cars are smaller than people
|
|
else:
|
|
print("We can't decide.") #print if cars are same with people
|
|
|
|
|
|
if trucks > cars: #check trucks are bigger than cars
|
|
print("That's too many trucks.") #print if trucks are bigger than cars
|
|
elif trucks < cars: #check trucks are smaller than cars
|
|
print("Maybe we could take the trucks.") #print if trucks are smaller than cars
|
|
else:
|
|
print("We still can't decide.") #print if trucks are same with cars
|
|
|
|
if people > trucks: #check people are bigger than trucks
|
|
print("Alright, let's just take the trucks.") #print if people are bigger than trucks
|
|
else:
|
|
print("Fine, let's stay home then.") #print if people are bigger than trucks
|
|
|
|
if cars > people or trucks < cars: #check cars are bigger than people or trucks are smaller than cars
|
|
print("cars are many") #print if cars are bigger than people or trucks are smaller than cars
|
|
else:
|
|
print("trucks or people is bigger") #print not (cars > people or trucks < cars)
|