Question: use python Design a function called bill_with_tip that takes two arguments: a. a floating-point value representing the bill for dinner at a restaurant b. a
use python
Design a function called bill_with_tip that takes two arguments:
a. a floating-point value representing the bill for dinner at a restaurant
b. a string representing the service, which is either bad, average, good, or excellent
The bill_with_tip function calculates and returns a floating-point value representing the final bill amount after combining a tip with the original bill. The tip amount depends on the service:
- 10% tip for bad service
- 15% tip for average service
- 20% tip for good service
- 25% tip for excellent service
Note: The only possible values for the service are 'bad', 'average', 'good', and 'excellent'
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
