Using Python: program6_1.py Write a program that uses a text file to store weekly payroll data for the office. The program should enable the user to enter the name, hourly pay rate, and weekly hours for a number of office employees. The pay rate and hours should be type float, and each datum should be written to its own line in the file. Enter data for at least five employees and then close the file. Sample Output See image below program6_2.py This program reads the text file created in the program above and then calculates and prints each employee's weekly pay. Note the currency format with commas for thousands. The program should finish by printing the total payroll for the office. Sample Output see image below
Using Python:
program6_1.py
Write a program that uses a text file to store weekly payroll data for the office. The program should enable the user to enter the name, hourly pay rate, and weekly hours for a number of office employees. The pay rate and hours should be type float, and each datum should be written to its own line in the file. Enter data for at least five employees and then close the file.
Sample Output See image below
program6_2.py
This program reads the text file created in the program above and then calculates and prints each employee's weekly pay. Note the currency format with commas for thousands. The program should finish by printing the total payroll for the office.
Sample Output see image below
Trending now
This is a popular solution!
Step by step
Solved in 2 steps