#Define a function to calculate the updated salary based on years of service
def calculate_updated_salary(current_salary, years_of_service):
if years_of_service > 5:
new_salary = current_salary * 1.05 # Increase the salary by 5% if service is greater than 5 years
return new_salary
else:
return current_salary # Keep the current salary if service is 5 years or less
#Input the current salary from the user
current_salary = float(input(“Enter current salary: “))
#Input the number of years of service from the user
years_of_service = int(input(“Enter the number of years you have serviced the company: “))
#Calculate the new salary
new_salary = calculate_updated_salary(current_salary, years_of_service)
#Check if the salary has changed and print the appropriate message
if new_salary != current_salary:
print(“Your updated salary is: $” + str(new_salary))
else:
print(“No change in your salary. Your current salary is: $” + str(current_salary))