def calculate_salesperson_wage():
sales = float(input("Enter the gross sales for the month: "))
fixed_salary = 2000
commission = 0.08 * sales
total_wage = fixed_salary + commission
print(f"Total monthly wage: R{total_wage:.2f}")
def calculate_manager_wage():
hours_worked = float(input("Enter the number of hours worked for the month: "))
hourly_rate = 40
total_wage = hourly_rate * hours_worked
print(f"Total monthly wage: R{total_wage:.2f}")
employee_type = input("Are you a salesperson or a manager? ")
employee_type = employee_type.lower()
if employee_type == "salesperson":
calculate_salesperson_wage()
elif employee_type == "manager":
calculate_manager_wage()
else:
print("Invalid employee type. Please try again.")