dict_name = {
1: 'John',
2: 'Lisa',
3: 'Marry',
4: 'Tom',
5: 'Michael'
}
dict_salary = {
1: 50.000,
2: 60.000,
3: 85.000,
4: 70.000,
5: 88.000
}
dict_design = {}
for employee in dict_name:
if dict_salary[employee] <= 90.000:
if dict_salary[employee] >= 80.000:
dict_design[employee] = 'Project Manager'
elif dict_salary[employee] >= 70.000:
dict_design[employee] = 'Team Leader'
elif dict_salary[employee] >= 60.000:
dict_design[employee] = 'Software Developer'
elif dict_salary[employee] >= 50.000:
dict_design[employee] = 'Software Trainee'
else:
dict_design[employee] = '_____'
else:
dict_design[employee] = '_____'
print(dict_design)
Comments
Leave a comment