Tell us what’s happening:
can anyone provide correct code i tried hints but doesnt works can any one complete code
Your code so far
def apply_discount (price, discount):
calc_discount = price*(1-discount/100)
ver_discount = (price, discount)
if isinstance(ver_discount, int or float):
print("The price should be a number")
if ver_discount < 0 :
print("The price should be greater than 0")
if ver_discount > 100:
print("The price should be greater than 0")
return calc_discount
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36
Challenge Information:
Build an Apply Discount Function - Build an Apply Discount Function