Question: Coffee orders made simple. Ask the user for white or black coffee Ask for their chosen size: small, medium or large Then print the cost:
- Coffee orders made simple.
- Ask the user for white or black coffee
- Ask for their chosen size: small, medium or large
- Then print the cost: For Black: Small = $3, Medium = $4, Large = $5.
- White coffee costs $1 more no matter what size is chosen, e.g., a white medium is $5.
- If a user makes a mistake with either part of their order, just pick the most expensive option in each case :)
- E.g., a purple small coffee would cost $4, a black tiny coffee would cost $5, and a green extra small would cost $6. (This can be done by thinking about the default case for each user input.)
- Note: You can use the string methods.upper()or.lower()to make your string comparisons case-insensitive, e.g.,
string = input("Prompt: ").lower() if string == "string": print("It matches without capitals") 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
