Question: How to you define this into a function in python. # Give user option to input the Bread condition loaf_of_bread_condition = (input(Enter the bread condition:
How to you define this into a function in python.
# Give user option to input the Bread condition loaf_of_bread_condition = (input("Enter the bread condition: ")) # Bread condition list. bread_condition = ["Passed its expiration date", "Stale", "Smooshed", "Damaged", "Smells sour", "Has colored spots"] # Check if condition of bread exist in the list. if loaf_of_bread_condition in bread_condition: print("Throw it out.") # Optional if the user input bread condition not in the list. else: print("Bread condition doesn't exist.") Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
