Backgound

The employees can be any one of the two types: 1) Full-Time Salaried (FTS) and 2) Part-Time Hourly (PTH).
Currently, there are totally 1050 FTS employees and 274 PTH employees in a company.
The company plans to add up to 50 new employees
FTS employees are paid in a fixed amount per week irrespective of the number of hours they work.
FTS employees are paid a gross salary anywhere between $1000 to $1500 per week (after picking randomly the
salary should be fixed for an employee until a pay-hike).
FTS employee Take home salary would be 30% less owing to federal/state income taxes and other deductibles.
PTH employees are paid a gross wage of $35.25 per hour.
PTH employees’ incomes depend on the number of hours worked.
PTH employees work anywhere between 20 to 30 hours per week.
PTH employee Take home salary would be 20% less owing to federal/state income taxes.
Program
Create a data structure for employees that will store the following information for each employee:
• Full Name
• ID (IDs have a format 333-xxxx. Employee1 = 333-0000, employee2 = 333-0001 and so on.)
• Status: FTS or PTH
• Gross Salary per week (only for FTS employees)
• Wages per hour (only for PTH employees)
• Hours worked per week (only for PTH employees)
Notes: Type/number of data structures can be student’s personal choice
Remember: Allow space in your data-structure for adding new employees
Initialize the database: Fill random values for all the information for all the current employees (1050 FTS
employees and 274 PTH employees).
Your program in an infinite loop, should ask for the following choices
a) Add New Employee
Write a user-defined function that will process this choice
a. Ask for Name
b. Assign a random ID that has not been used yet. Two employees should NOT have the same
employee ID.
c. Ask for Status
d. If the Status is FTS, ask for Gross Salary
e. If the Status is PTH, ask for Wages per hour
f. ADD the new employee to the data-structure and provide confirmation
b) Delete Employee
Write a user-defined function that will process this choice
a. Ask for ID and delete the employee-entry
b. Provide confirmation that the entry is deleted
c. If not found, print “NOT FOUND”
c) Search and Display Employee Information
Write a user-defined function that will process this choice
a. Ask for ID and print all information
b. If not found, print “NOT FOUND”
c. If FTS employee, print gross_salary and take-home_salary
d. If PTH employee, print wages/hr, number_of_hours_worked_this_week (random), gross_salary
and take-home_salary
d) Update Employee Information
Write a user-defined function that will process this choice
a. Ask for ID (print NOT FOUND if the ID is not found)
b. Ask for WHAT do you want to update (Status or Pay-scale)
c. Ask for new Status: (updating the status of an employee)
i. Update the status of the specified employee
ii. Provide confirmation about status change
d. Ask for Pay Hike Percentage: (example: 2 means increasing salary or wages by 2%)
i. Increase the salary or wages of the specified employee by the specified percentage
ii. Provide confirmation (Display old salary or wages and new salary or wages)
e) FTS Employee Statistics
Write a user-defined function that will process this choice
a. List ALL FTS employees names and IDs
b. Print Average of the Salary/week
c. Print Standard Deviation of the Salary/week
f) PTH Employee Statistics
Write a user-defined function that will process this choice
a. List ALL PTH employees names and IDs
b. Print Average of the Hours_worked/week and Salary/week
c. Print Standard Deviation of the Hours_worked/week and Salary/week
g) QUIT the system
a. Quit the infinite loop

See response to your repost:

http://www.jiskha.com/display.cgi?id=1290107746

To create a data structure for storing employee information, you can use a dictionary in Python. Each employee can be represented as a key-value pair, with the employee ID as the key and the employee information as the value. Here's an example:

```python
employees = {
'333-0000': {
'Full Name': 'John Doe',
'ID': '333-0000',
'Status': 'FTS',
'Gross Salary per week': 1200,
'Wages per hour': None,
'Hours worked per week': None
},
'333-0001': {
'Full Name': 'Jane Smith',
'ID': '333-0001',
'Status': 'PTH',
'Gross Salary per week': None,
'Wages per hour': 35.25,
'Hours worked per week': 25
},
# Add more employee entries here
}
```

In this example, we have two employees with their respective information filled in. The 'Gross Salary per week' and 'Wages per hour' fields are left empty for now because they depend on the employee status.

To fill random values for the current employees, you can generate random values using the `random` module in Python. Here's an example of how you can generate random values for the salary and hours worked fields for the FTS and PTH employees respectively:

```python
import random

# For FTS employees
for employee in employees.values():
if employee['Status'] == 'FTS':
employee['Gross Salary per week'] = random.randint(1000, 1500)

# For PTH employees
for employee in employees.values():
if employee['Status'] == 'PTH':
employee['Hours worked per week'] = random.randint(20, 30)
```

Now, you can create a program that runs in an infinite loop and asks for user choices. You can use a `while` loop for this. Inside the loop, you can use a `input` function to ask for the user's choice and then process it accordingly.

Here's an example of how you can structure your program:

```python
while True:
choice = input("Enter your choice (a, b, c, d, e, f, g): ")

if choice == 'a':
# Process the 'Add New Employee' choice
# Ask for Name, ID, Status, Gross Salary/Wages per hour, Hours worked per week
# Add the new employee to the data structure

elif choice == 'b':
# Process the 'Delete Employee' choice
# Ask for ID and delete the employee-entry

elif choice == 'c':
# Process the 'Search and Display Employee Information' choice
# Ask for ID and print all information

elif choice == 'd':
# Process the 'Update Employee Information' choice
# Ask for ID and WHAT to update (Status or Pay-scale)

elif choice == 'e':
# Process the 'FTS Employee Statistics' choice
# List names and IDs, print Average of the Salary/week, print Standard Deviation of the Salary/week

elif choice == 'f':
# Process the 'PTH Employee Statistics' choice
# List names and IDs, print Average of the Hours_worked/week and Salary/week, print Standard Deviation of the Hours_worked/week and Salary/week

elif choice == 'g':
# Quit the system
break

else:
print("Invalid choice. Please try again.")
```

You can now implement the logic for each choice by defining user-defined functions as mentioned in the task requirements. For example, for the 'Add New Employee' choice, you can define a function that asks for the required information and adds the new employee to the data structure.

Hope this helps you get started with creating your program! Let me know if you have any further questions.