I can’t get through tests number 3, 4, 5 and 6. Although my calculator is working, and the results are good. This is what I did untill now:
def apply_discount(price, discount):
if isinstance(price,int)==False and isinstance(price.float)==False:
print('The price should be a number')
elif isinstance(discount,int)==False and isinstance(discount,float)==False:
print('The discount should be a number')
elif price<=0:
print('The price should be greater than 0')
elif discount<0 or discount>100:
print('The discount should be between 0 and 100')
else:
return price - (discount / 100 \* price)
final_price = apply_discount(2,50)
print ('The final price is ', final_price)