1
所以我真的很陌生(3天),我在代码学院,我为这些活动之一编写了代码,但是当我运行它时,它显示最大递归深度错误,我正在运行它在代码学院的python控制台中,同时在我自己的ipython控制台上。页面上的提示是没有用的,任何人都可以解释如何解决这个问题吗? 感谢最大递归深度错误?
def hotel_cost(nights):
return (nights * 140)
def plane_ride_cost(city):
if plane_ride_cost("Charlotte"):
return (183)
if plane_ride_cost("Tampa"):
return (220)
if plane_ride_cost("Pittsburgh"):
return (222)
if plane_ride_cost("Loas Angeles"):
return (475)
def rental_car_cost(days):
cost = days * 40
if days >= 7:
cost -= 50
elif days >= 3:
cost -= 20
return cost
def trip_cost(city, days):
return hotel_cost(nights) + plane_ride_cost(city) + rental_car_cost(days)
*编辑*我知道的拼写错误的:') –