Files
ba-degree/basic programming/2nd task/3.py
2024-12-07 22:06:50 +02:00

20 lines
428 B
Python

# 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")