write the python program for the question in the image showed below
Answers
Program:
def find_new_salary(current_salary,job_level):
new_salary = current_salary
job_lvl = [3,4,5]
job_hike = [15,7,5]
i = 0
while i < 3:
if job_lvl[i] == job_level:
new_salary = current_salary + ( ( job_hike[i] / 100 ) * current_salary )
i = i + 1
return int(new_salary)
a = int(input("Enter salary"))
b = input("Enter job lvl")
new_salary=find_new_salary(a,b)
print(new_salary)
Output:
Enter salary10000
Enter job lvl3
11500
----hope this helps
CODE:
salary, job_level = float(input('Enter salary:')), int(input('Job level:'))
if job_level == 3:
print('Your new salary would be %d'%(salary+(0.15*salary)))
elif job_level == 4:
print('Your new salary would be %d'%(salary+(0.07*salary)))
else:
print('Your new salary would be %d'%(salary+(0.05*salary)))