Taking a vac


can someone pls tell me where i went wrong with this? the error message says the the value for 3 days is NONE.

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


a return keyword is only reached if else runs, a return keyword should always be reached.

either return the cost in the if, elif and else, or after the else.


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