CCCPaste

Quiz2_Set2

monthly_wage = int(input('Enter the monthly wage: '))
work_experience = int(input('Enter working expereince (Months): '))

bonus = 0

if work_experience >= 12:
    if 1*12 <= work_experience <= 3*12:
        bonus = 1*monthly_wage
    elif 4*12 <= work_experience <= 7*12:
        bonus = 2*monthly_wage
    elif 8*12 <= work_experience <= 10*12:
        bonus = 3 * monthly_wage
    elif work_experience > 10*12:
        bonus = 5 * monthly_wage
elif work_experience >= 6:
    bonus = monthly_wage*0.5

salary = monthly_wage + bonus

if salary >= 30000:
    tax = 0.07
elif salary >= 10000:
    tax = 0.05
else:
    tax = 0

tax_amount = salary*tax
net_salary = salary - tax_amount

years = work_experience // 12
months = work_experience - (years*12)

print(f'Service period in the company = {years} Years {months} Months')
print(f'Bonus = {bonus}')
print(f'Salary = {salary}')
print(f'Tax ({int(tax*100)}%) = {tax_amount:.0f}')
print(f'Net Salary = {net_salary}')