Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Perform the following tasks in order: Create a dictionary using the following pay rates: Aubrey = 2 1 . 0 5 , Sam = 2

Perform the following tasks in order:
Create a dictionary using the following pay rates: Aubrey =21.05, Sam =20.95, Lucia =15.75, Tyler =15.75 and store it as a variable named employees.
Create the terminated employees list including the initial names in this order: Benjamin, Sandy and store it in a variable named terminated.
Ask your user if they want to add, remove, or view the current employees using an input function. The input function MUST include the words "add", "remove", and "view". The grader will use 'a' for add, 'r' for remove, and 'v' for view when responding to the prompts, so your code MUST handle those 3 values to function properly.
Depending on what the user input is, add an employee to the dictionary, remove the employee from the dictionary and insert into the list, or show the list and dictionary.
If they are adding, collect their name and hourly pay rates with separate input functions. The input function for name MUST include the words "enter", "name", and "employee" in its prompt and the input function for pay rate must include the words "hourly", "pay", and "rate" in its prompt. This data needs to be added to the employees dictionary that you created previously. Print the dictionary once the new employee is added.
If they are terminating an employee, collect the name of the employee with an input function. The input function for this MUST include the word "terminate" in its prompt. Print the employees dictionary AND the terminated list.
Finally, if the user is viewing, perform no other actions except for printing out the employees dictionary and the terminated list.
Place all of this in the code cell below.
Feel free to test your code and verify the outputs.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

T Sql Window Functions For Data Analysis And Beyond

Authors: Itzik Ben Gan

2nd Edition

0135861446, 978-0135861448

More Books

Students also viewed these Databases questions

Question

here) and other areas you consider relevant.

Answered: 1 week ago