# Kaggle Python Kurs. Exercise on booleans
def onionless(ketchup, mustard, onion):
"""Return if the customer does not want onions"""
return not onion
print(onionless(True, False, True))
def wantsalltoppings(ketchup, mustard, onion):
"""Return if the customer wants all topings"""
return ketchup and mustard and onion
print(wantsalltoppings(True, False, True))
print(int(False))
def exactly_one_topping(ketchup, mustard, onion):
"""Return if the customer wants exactly one of the three available toppings on their hot dog"""
return int(ketchup) + int(mustard) + int(onion) == 1
print(exactly_one_topping(True, False, False))
def should_hit(dealer_total, player_total, player_low_aces, player_high_aces):
"""Gives True if the player should hit (request another card) or False if
the player should not request another card given the curren game state"""
To embed this project on your website, copy the following code and paste it into your website's HTML: