Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please solve this Python 3 : Ask the user what size cup they want, choosing between small, medium, and large. Ask the user what kind
Please solve this Python 3 :
- Ask the user what size cup they want, choosing between small, medium, and large.
- Ask the user what kind of coffee they want, choosing between brewed, espresso, and cold brew.
- Ask the user what flavoring they want, if any. Choices include hazelnut, vanilla, and caramel.
- Calculate the price of the cup using the following values:
- Size:
- small: $2
- medium: $3
- large: $4
- Type:
- brewed: no additional cost
- espresso: 50 cents
- cold brew: $1
- Flavoring:
- None: no additional cost
- All other options: 50 cents
- Size:
- Display a statement that summarizes what the user ordered.
- Display the total cost of the cup of coffee as well as the cost with a 15% tip, in phrases that explain the values to the user. Round the cost with tip to two decimal places.
- For example, if the user asks for a medium-sized espresso with hazelnut flavoring, the total should be $4; the total with a tip should be $4.60.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started