Daily Coding Challenge: Fill the Tank

I’m drawing a blank here. I did this in an online compiler. It appears my answers match the solution, but none of the tests are passing. What did I miss?

Link to Coding Challenge

Given the size of a fuel tank, the current fuel level, and the price per gallon, return the cost to fill the tank all the way.

  • tankSize is the total capacity of the tank in gallons.

  • fuelLevel is the current amount of fuel in the tank in gallons.

  • pricePerGallon is the cost of one gallon of fuel.

  • The returned value should be rounded to two decimal places in the format: "$d.dd".

def cost_to_fill(tank_size, fuel_level, price_per_gallon):

    cost = (tank_size - fuel_level) * price_per_gallon
    result = f"\"${cost:,.2f}\""
    return str(result)

I don’t think you need the double double quotes

1 Like

This was the answer. I thought the answer had to have quote marks in them. Thanks!