def hotel_cost(nights):
hotel_cost=140
return 140*nights
def plane_ride_cost(city):
if city=="Charlotte":
return 183
if city=="Tampa":
return 220
if city=="Pittsburgh":
return 222
else:
return 475
plane_ride_cost("Tampa")
def rental_car_cost(days):
total=40*days
if days>=7:
total = total -50
return total
elif days>=3:
total= total-20
return total
else:
return total
print rental_car_cost(1)
def trip_cost(city,days):
city="Tampa"
days=4
nights=6
return plane_ride_cost(city)+rental_car_cost(days)+hotel_cost(nights)
print trip_cost("Tampa",4,6)
====> error: Oops, try again. trip_cost('Pittsburgh', 9) returned 1200 instead of the correct value 1792
Mọi người cho hỏi lỗi gì đây?

83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?