if i rent the car for one day:
cost = (days) * 40
so that is 1 * 40 = 40.
then the if condition:
if (days) <= 7:
cost = cost - 50
is 1 less or equal to 7? Yes it is, so 40 - 50 = -10, which gets returned, end of function.
I would check if the car gets rented for less then 3 days, and return the cost without discount if it is. You might want to check the order of the if/elif statements as well.
the exercise url: https://www.codecademy.com/en/courses/python-beginner-P5YtY/1/3
@bandit, you can return in each if/elif/else statement, that is fine. It is more code then just updating the cost variable and returning it at the end, but both are perfectly fine.