Oops, try again. It looks like rental_car_cost returns 96.0 instead of the correct amount (100) for 3 days


#1


My title says it all. Don't know why it is not accepting my code


def rental_car_cost (days):
    if days>=7:
        bill=days*40
        return bill-(bill*0.50)
    elif days>=3 and days <7:
        bill=days*40
        return bill-(bill*0.20)
    else:
        return days*40


#2

if the car is rented for 8 days, you simply get 50$ (dollar, or whatever currency is used) discount, which means you simply subtract 50 of the bill, no need for multiplying


#3

ohh.. my bad I thought it to be 50 percent.
Thanks for your answer


#4

from the instructions:

if you rent the car for 7 or more days, you get $50 off your total.

not sure how that is 50%, but i assume you got it all sorted now? :slight_smile:


#5

yeah, it's absolutely fine now
Thanks


#6