uploaded 1-6

This commit is contained in:
2024-12-07 22:06:50 +02:00
parent c231dce57f
commit 017145b529
6 changed files with 74 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
# Q3
# Get salary
salary = float(input("Input salary: "))
# Calcuation of tax
tax = 0
if salary > 7000:
# If above 7000NIS, deduct 30% from the sum above 7000NIS
tax += (salary - 7000) * 0.30
salary = 7000 # Set salary after deducting taxed sum
if salary > 5000:
# If above 5000NIS, deduct 20% from the sum above 5000NIS
tax += (salary - 5000) * 0.20
# Print taxes
print(f"Sum of taxes: {tax:.2f}NIS")