Skip to the content.

3.6 Homework

def determine_food(person_type):
    if person_type == "healthy":
        print("Eat an apple.")
    elif person_type == "doesn't care":
        print("Drink coffee.")
    elif person_type == "unhealthy":
        print("Eat chocolate.")
    else:
        print("Unknown preference. Choose a valid option.")

# Example usage:
determine_food("healthy")        # Output: Eat an apple.
determine_food("doesn't care")   # Output: Drink coffee.
determine_food("unhealthy")      # Output: Eat chocolate.