subject

Write a split check function that returns the amount that each diner must pay to cover the cost of the meal The function has 4 parameters: 1. bill: The amount of the bill,
2. people. The number of diners to split the bill between
3. tax_percentage: The extra tax percentage to add to the bill.
4. tip_percentage: The extra tip percentage to add to the bill.
The tax or tip percentages are optional and may not be given when caling split_check. Use default parameter values of 0.15 (15%) for tip percentage, and 0.09 (9%) for tax_percentage
Sample output with inputs: 252
Cost per diner: 15.5
Sample output with inputs: 100 2 0.075 0.20
Cost per diner: 63.75
1 # FIXME: write the split. check function: HINT: Calculate the amount of tip and tax,
2 # add to the bill total, then divide by the number of diners
3.
4. Your solution goes here
5.
6. bill - float(input)
7. people intinout)
8.
9. Cost per diner at the default tax and tip percentages
10. print('Cost per diner: split_check(bill, people))
11.
12. bill - float(input)
13. people int(input)
14. newtax_percentage - float(input)
15. nen_tip percentage float(input)
16.
17. Oust per dinero different tox and tip percentage
18. print('Cost per diner: split checkbull people, new tax percentage, new tip percentage)

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:30
Ted wants to go out to a neighborhood park and shoot pictures of dew drops on grass. he wants to get a low-level angle of the dew drops. which support equipment should ted use? a. mini tripod b. pistol grip c. monopod d. body mount
Answers: 2
question
Computers and Technology, 22.06.2019 18:30
Technician a says that a shop towel should never be used to clean around the flange area before replacing an automatic transmission filter. technician b says that a dimpled transmission fluid pan can be repaired. who is right
Answers: 3
question
Computers and Technology, 22.06.2019 23:00
Suppose s, t, and w are strings that have already been created inside main. write a statement or statements, to be added to main, that will determine if the lengths of the three strings are in order by length, smallest to largest. that is, your code should determine if s is strictly shorter than t, and if t is strictly shorter than w. if these conditions hold your code should print (the boolean value) true. if not, your code should print false. (strictly means: no ties) example: if s, t, and w are "cat", "hats", and "skies" your code should print true - their lengths are 3-4-5; but if s, t, and w are "cats" "shirt", and "trust", then print false - their lengths are 4-5-5 enter your code in the box below
Answers: 2
question
Computers and Technology, 23.06.2019 11:00
In the context of the box model, what is the difference between a margin and a padding? a. a padding lies outside a box border, while a margin lies inside it. b. a padding lies inside a box border, while a margin lies outside it. c. a padding can be adjusted independently, while a margin depends on the size of its box. d. a padding depends on the size of its box, while a margin can be adjusted independently.
Answers: 3
You know the right answer?
Write a split check function that returns the amount that each diner must pay to cover the cost of t...
Questions
question
Mathematics, 29.04.2021 21:10
question
Mathematics, 29.04.2021 21:10
question
History, 29.04.2021 21:10
Questions on the website: 13722359