What am I doing wrong? [SOLVED]


#1

EDIT: PROBLEM SOLVED. I just forgot to add "return total_cost" at the end. Sorry for the inconvenience. Topic can be locked.

Oops, try again. It looks like rental_car_cost returns None instead of the correct amount (40) for 1 days.


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


#3

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