4.(Functions) > Taking a vacation > 4.(Transportation)
Oops, try again. It looks like rental_car_cost returns None instead of the correct amount (40) for 1 days. But it's working for more than a day.
I expect for for 1 day to have a return of 40.
def rental_car_cost(d): rentcost = d * 40 if d >= 7: rentcost-=50 return(rentcost) elif d >= 3 and d < 7: rentcost-=20 return(rentcost) rental_car_cost(4)
Found what my error is, it was a stupid one, I wasn't considerating rentals lasting less than 3 days.
else: return(d * 40)