no way to compare when less than two revisions

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.


de:modul:m319:learningunits:lu05:loesungen:inheritancetax [2025/06/23 07:45] (aktuell) – ↷ Seite von modul:m319:learningunits:lu05:loesungen:inheritancetax nach de:modul:m319:learningunits:lu05:loesungen:inheritancetax verschoben msuter
Zeile 1: Zeile 1:
 +====== LU05.L07: British Inheritance Tax ======
 +
 +<code python>
 +def main():
 +    tax = 0
 +    TAX_EXEMPTION_LIMIT = 325000
 +
 +    inheritance = int(input('Inheritance:\n'))
 +    taxable_amount = inheritance - TAX_EXEMPTION_LIMIT
 +    years = int(input('Years since death:\n'))
 +
 +    if taxable_amount > 0:
 +        if years < 3:
 +            tax = taxable_amount * 0.40
 +        elif years < 4:
 +            tax = taxable_amount * 0.32
 +        elif years < 5:
 +            tax = taxable_amount * 0.24
 +        elif years < 6:
 +            tax = taxable_amount * 0.16
 +        elif years < 7:
 +            tax = taxable_amount * 0.08
 +
 +    print(f'Tax: {tax}')
 +
 +
 +if __name__ == '__main__':
 +    main()
 +
 +</code>
 +
 +----
 +{{tag>M319-LU05}}
 +[[https://creativecommons.org/licenses/by-nc-sa/4.0/ch/|{{https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png}}]] Kevin Maurizi, Marcel Suter
  
  • de/modul/m319/learningunits/lu05/loesungen/inheritancetax.txt
  • Zuletzt geändert: 2025/06/23 07:45
  • von msuter