Op dinsdag 10 september 2019 13:03:46 UTC+2 schreef tim...@quicknet.nl: > Hi everybody, > > For school i need to write the right code to get the following outcome. > Can someone help me with this.... > I can't find a solution to link the word high to 1.21. > > 11 print(add_vat(101, 'high')) > 12 print(add_vat(101, 'low')) > > Outcome: > > 122.21 > 110.09 > > Thanks!
Hi inhahe, Yeah the 21 was just an example the calculation will come later. First i need to figure this out... Is this what you mean with adding a dictionary? berekening = amount * (1+(vat_rate={'high':21, 'low':5}) -- https://mail.python.org/mailman/listinfo/python-list