Question: This should be done using python code +while loops and please call the function in the t07 . Implement the following function in the PyDev

This should be done using python code +while loops and please call the function in the t07 .

Implement the following function in the PyDev module functions.py and test it from a PyDev module named t07:

def meal_costs(): """ ------------------------------------------------------- Asks a user the costs of breakfast, lunch, and supper for each day the user was away. Assumes there is at least one day, and after entering data for each day asks the user whether they want to enter data for another day. Calculates total costs for meals. Use: b_total, l_total, s_total, a_total = meal_costs() ------------------------------------------------------- Returns: b_total - total breakfasts cost (float) l_total - total lunches cost (float) s_total - total suppers cost (float) a_total - all meals cost (float) ------------------------------------------------------ """ 

Sample testing:

For Day 1 How much was breakfast? $7.95 How much was lunch? $15.32 How much was supper? $42.56 Your total for the day was $65.83 Were you away another day (Y/N)? Y For Day 2 How much was breakfast? $5.55 How much was lunch? $12.39 How much was supper? $36.23 Your total for the day was $54.17 Were you away another day (Y/N)? N Total: Breakfast: $ 13.50 Lunch: $ 27.71 Supper: $ 78.79 Grand total: $120.00

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!