Question: Note: For this lab, first we need to define 3 functions: roomCost, mealCost, and excursionCost, then we call these 3 functions separately to calculate cost
Note:
For this lab, first we need to define functions: roomCost, mealCost, and excursionCost, then we call these functions separately to calculate cost for room, meal, and excursion, finally Totalcost is calculated.
Here are some sample code:
# Define mealcost function
def mealcostbrunch dinner:
sub brunch dinner
grat sub
return sub grat
# Call mealCost function
brunchcount intinputHow many Brunches:
dinnercount intinputHow many Dinners:
mealCost brunchcount, dinnercount
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
