# (Programming: 8 points) A certain company has decided to
#   give all employees a bonus.  Write code you could put in file 
#     bonus.py to compute and print the bonus. Accept from the user two
#   floats: annual salary and years of service.  The bonus is a
#   percentage of annual salary based on an employee's years of service
#   as follows: more than 10 years of service, bonus is 10%; 6 to 10
#   years of service, bonus is 8%; less than 6 years of service, bonus
#   is 4%.  Assume inputs are non-negative floats.  Show the bonus with
#   a dollar sign and two digits after the decimal point.
#
# Below is some sample behavior:
# > python bonus.py                  > python bonus.py
# Salary: 100000.0                   Salary: 50500.00
# Years of service: 7.8              Years of service: 15
# Bonus is: $8000.00                 Bonus is: $5050.00

# file: bonus.py

salary = float( input("Salary: "))
yearsService = float( input("Years of service: "))
if yearsService > 10:
    multiplier = 0.10
elif 6 <= yearsService <= 10:
    multiplier = 0.08
else:
    multiplier = 0.04
bonus = salary * multiplier
print("Bonus is: $", format(bonus, ".2f"), sep="")
