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