#sample solution
def hotelCost(days):
return days * 140
def planeRideCost(city):
if city == "Charlotte":
return 183
elif city == "Tampa":
return 220
elif city == "Pittsburgh":
return 222
elif city == "Los Angeles":
return 475
else:
return "Unknown destination"
def rentalCarCost(days):
totalCarCost = days * 40
if days < 3:
return totalCarCost
elif days >= 3 and days < 7:
return totalCarCost - 20
elif days >= 7:
return totalCarCost - 50
No comments:
Post a Comment