What am i doing wrong? It keeps telling me:Oops, try again. An error was raised for rental_car_cost(1): global name 'cost' is not defined

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


well these returns are not necessary. Get rid of them.


im still getting the same error


And to have an equal sign you only need one of these not 2 :thumbsup:


fixed it thanks! :grin:


No problem! :smiley: happy coding! :taco:


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