Vorlesung 2
This commit is contained in:
18
Vorlesung 2/Uebung5.py
Normal file
18
Vorlesung 2/Uebung5.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# steuerrechner.py
|
||||
|
||||
gehalt = int(input("Bitte geben Sie Ihr Bruttogehalt ein: "))
|
||||
familienstand = input("Bitte geben Sie Ihren Familienstand ein (ledig/verheiratet): ")
|
||||
|
||||
if (gehalt > 4000 and familienstand == "ledig"):
|
||||
steuer = gehalt * 0.26
|
||||
|
||||
if (gehalt > 4000 and familienstand == "verheiratet"):
|
||||
steuer = gehalt * 0.22
|
||||
|
||||
if (gehalt <= 4000 and familienstand == "ledig"):
|
||||
steuer = gehalt * 0.22
|
||||
|
||||
if (gehalt <= 4000 and familienstand == "verheiratet"):
|
||||
steuer = gehalt * 0.18
|
||||
|
||||
print("Es ergibt sich eine Steuer von ", steuer, "€.")
|
||||
Reference in New Issue
Block a user