Learn to code with step-by-step lessons. A place for students to work through programming fundamentals and build skills.
One possible program:
def discounted_price(price, percent_off):
return price * (1 - percent_off / 100)
print(discounted_price(100.0, 20))
print(discounted_price(50.0, 10))