0

In the below code I am trying to return price excluding VAT.

I am passing in price including VAT as 'incl'. I am trying to work with a VAT amount of 15 instead of 15% as that is how it is stored on the database I work with.

Can someone please explain why the below does not return 85? try as I might it returns 100 time after time.

def lessvat(incl,vat):
    
    vat_perc = vat / 100
    diff = incl * vat_perc 
    return( incl - diff )
    


print(lessvat(100,15))

I'm new to this...

thanks

Too Late
  • 59
  • 6

0 Answers0