A default discount rate

Fill in the blanks · Basic · §8.3 Handing over ingredients

If no discount rate is given, the function returns the price with a 10% discount. Fill in the default value.

Code with blanks

def sale_price(price, rate=____):
    return price * (1 - rate)

print(sale_price(10000))
print(sale_price(10000, 0.2))

Solve this problem in your browser

Python runs in your browser and checks your answer right away. Hints and the answer are on the problem page.