CNSA-266-Personal/Barista.py

18 lines
476 B
Python
Raw Normal View History

2024-04-23 09:40:13 -04:00
NUM_EMPLOYEES = 6
def main():
hours = [0.0] * NUM_EMPLOYEES
for index in range(NUM_EMPLOYEES):
print("Enter the hours worked by employee ", index + 1, ": ", sep="", end="")
hours[index] = float(input())
pay_rate = float(input("Enter the hourly pay rate: "))
for index in range(NUM_EMPLOYEES):
gross_pay = hours[index] * pay_rate
print("Gross pay for employee ", index + 1, ": $", format(gross_pay, ',.2f'), sep="")
main()