Problem 2) There are managers, managers, deputies, employees, and interns in one department of the company. The annual salary is different for each position. The manager's annual salary is 80 million won, the manager's annual salary is 60 million won, the assistant manager's annual salary is 40 million won, the employee's annual salary is 30 million won, and the intern's annual salary is 10 million won. Write a program that prints your annual salary by entering your name and position. You must meet the following requirements. (Program File Name: Name_Problem2)
This is a problem, but I don't know how to approach it and program it.
Does anyone know how to do it?
I'm a beginner who just learned Python. I beg you.
python
li = [8000, 6000, 4000, 3000, 1000]
print(li)
name = input()
crass = int(input())
if 0 <= crass < 5:
The annual salary of print(str(name) + ": " + str(li[crass])))
else:
print("Invalid entered".")
Do you use dictionaries?
© 2024 OneMinuteCode. All rights reserved.