Plan your Trip!


#1



Please help me with this one it is kinda of difficult

https://www.codecademy.com/en/courses/python-beginner-P5YtY/1/6?curriculum_id=4f89dab3d788890003000096#

The interper says:Oops! Did you accidentally delete the trip_cost function?


Here is my code:
Replace this line with your code. 
def hotel_cost(nights):
return 140 * nights
def planeridecost(city):
if city == "Charlotte":
return 183
elif city == "Tampa":
return 220
elif city == "Pittsburgh":
return 222
elif city == "Los Angeles":
return 475
def rentalcarcost(days):
if days >= 7:
return days * 40 - 50
elif days >= 3 < 7:
return days * 40 - 20
elif days >= 1: 
return days * 40
elif days == 0:
return 0
def tripcost(city, days, spendingmoney):
return trip_cost("Los Angeles", 5, 600)
tripcost == city + (days * 2) + spendingmoney
print trip_cost


#2

I already solved It I don't need any help now:grinning:


#3

Name of the function which you have written is wrong. Recheck it.


#4

Already got the code I don't need no help now


#5

I am not understanding.
last part of this assignment.
Explain please ...


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.