Transportation


#1

def rental_car_cost(days):
total=days*40
return total
if days>=7:
cost=total-50
return total
elif days>=3:
cost=total-20
return cost

It looks like rental_car_cost returns 120 instead of the correct amount (100) for 3 days.


#2

Hi @muffens

Mind posting a link to the lesson, so we can see the lesson? Thanks!


#3

#4

its transportation under the lesson taking a vacation


#5

You're returning total too early. Remove return total from the third line of the visible code.


#6

thank you that really helped


#7

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