[Solved]Python 3 Human Resources Contracted Write Employee Database Program Since Company Small D Q37052746
IN PYTHON 3:
Human Resources has contracted you to write an employee databaseprogram for them. Since the company is small, their database willexist in a text file. They would like to use a CSV file so they caneasily view the database in other programs, such as MicrosoftExcel.
Write a menu-driven program that supports two functions — theability to add an employee and the ability to view all employees.When adding a new employee, you should get the employees name,department, and salary. The salary should be inputted as a floatingpoint datatype.
When the program first starts, it should ask for the location ofthe database. That database file will then be used by all otherfunctions of the program (e.g. adding employee and viewingemployees). Your program should consist of 4 functions:
main(): This is the main function of the program. It shouldprompt the user for a db file location then continously display themenu and respond to the choice appropriately. For example, if theuser chooses menu option 1 then the add_employee() function shouldbe called. This process should continue until the user choosesoption 3 (i.e. Exit).
menu(): This function should display the menu to the user andask for a menu choice until a valid one is inputted. Lastly, itshould return the choice as an integer.
add_employee(db): This function should input an employee’s name,department, and salary from the user. Using that data, it will thenopen the db file in append mode and write a new row containing theemployees data.
view_employees(db): This function should open the db file inread-only mode and then parse the employee data to match the sampleexecution below.
IT NEEDS TO MATCH THE SAMPLE OUTPUT PERFECTLY. 


Sample Execution File path to database: employee.db 1. Add Employee 2. View Employees 3. Exit Choice: 1 Employee name: Bob Smith Department: Engineering Salary: 52000.50 1. Add Employee 2. View Employees 3. Exit Choice: 4 Choice: 5 Choice: 1 Employee name: Alice Jone Department: Sales Salary: 34535.21 1. Add Employee 2. View Employees 3. Exit Choice: 2 Employee: Bob Smith Department: Engineering Salary: $52000.50 We were unable to transcribe this imageFile path to database: 1. Add Employee 2. View Employees 3. Exit Choice: Employee name: Department: Salary: Expected output 1. Add Employee 2. View Employees 3. Exit Choice: Show transcribed image text Sample Execution File path to database: employee.db 1. Add Employee 2. View Employees 3. Exit Choice: 1 Employee name: Bob Smith Department: Engineering Salary: 52000.50 1. Add Employee 2. View Employees 3. Exit Choice: 4 Choice: 5 Choice: 1 Employee name: Alice Jone Department: Sales Salary: 34535.21 1. Add Employee 2. View Employees 3. Exit Choice: 2 Employee: Bob Smith Department: Engineering Salary: $52000.50
File path to database: 1. Add Employee 2. View Employees 3. Exit Choice: Employee name: Department: Salary: Expected output 1. Add Employee 2. View Employees 3. Exit Choice:
Expert Answer
Answer to IN PYTHON 3: Human Resources has contracted you to write an employee database program for them. Since the company is sma… . . .
OR

