write a program that calculates the gross pay and net pay of a weeklly paid employee

Tom wants a program to calculate his weekly gross pay. He never works

overtime, so you do not need to worry about overtime pay. You will just need
his pay rate and hours worked.

To write a program that calculates the gross pay and net pay of a weekly paid employee, you can follow these steps:

1. Define the employee's basic information like their name, hourly wage, and number of hours worked in a week.

2. Calculate the gross pay by multiplying the hourly wage by the number of hours worked in a week. If the employee works more than 40 hours, consider overtime pay at a rate of 1.5 times their regular hourly wage for each hour worked over 40.

3. Deduct various types of taxes and deductions to calculate the net pay. Some common deductions include federal taxes, state taxes, social security tax, and any other applicable deductions.

4. Output the calculated gross pay and net pay along with the employee's name and other relevant information.

Here's an example implementation in Python:

```python
# Step 1: Define employee information
name = input("Employee name: ")
hourly_wage = float(input("Hourly wage: "))
hours_worked = float(input("Hours worked in a week: "))

# Step 2: Calculate gross pay
if hours_worked <= 40:
gross_pay = hourly_wage * hours_worked
else:
overtime_hours = hours_worked - 40
overtime_pay = overtime_hours * hourly_wage * 1.5
gross_pay = (hourly_wage * 40) + overtime_pay

# Step 3: Calculate net pay (assuming a flat 20% deduction for taxes)
tax_rate = 0.2
taxes_deducted = gross_pay * tax_rate
net_pay = gross_pay - taxes_deducted

# Step 4: Output the results
print(f"\nEmployee: {name}")
print(f"Gross Pay: {gross_pay}")
print(f"Net Pay: {net_pay}")
```

In this example, the program prompts the user for the employee's name, hourly wage, and hours worked in a week. It calculates the gross pay by considering regular hours and any overtime worked. Lastly, it calculates the net pay by deducting a flat tax rate of 20% from the gross pay. The computed values are then displayed as output.