Question: 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 :

  1. Ask the user what size cup they want, choosing between small, medium, and large.
  2. Ask the user what kind of coffee they want, choosing between brewed, espresso, and cold brew.
  3. Ask the user what flavoring they want, if any. Choices include hazelnut, vanilla, and caramel.
  4. 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
  5. Display a statement that summarizes what the user ordered.
  6. 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!