Use Python: â Files and Exceptions. DO NOT use arrays for this problem. Document code throughout!Write a program to perform the following actions: a. Open an output file named employee.txt, write your own name to it and close the file.b. Ask the user to enter the name of any file and the userâs name and email address. Write the data to the file. In addition, use a loop to write the numbers 0 through 100 with steps of 10 to the file. Close the file. c. Open the file employee.txt, read your name from the file, display the name on the screen, and then close the file. d. Ask the user for the number of employees for processing employee data. Then, ask for a set of values for hours worked and pay rate and calculate pay for each employee. Assume double pay (2 times pay rate) for hours worked more than 40 hours. So, if the user wants to process 5 employees, you allow data entry for 5 employees. Use the try/except construct to display an error message, if the value for rate and/or hours worked entered by the user is character or decimal. Both values must be properly checked for invalid input. Calculate the total pay and the average pay. Write the data values to a file whose name is entered by the user (make sure to ask for the file name). Write the total and average pay values to this file.import os;#af= open("employee.txt","w")f.write("INSERT NAME HERE n")f.close()#bcwd = os.getcwd()print ("Current Working Directory", cwd)print…
Freebies just for you
We are available 24/7
We help you complete college assignments in under 24 hours.
Get help with essays, research papers, PowerPoint Presentations, reports, reviews, and projects at incredibly low prices.
Files and Exceptions
We will write a custom paper for you at $15.50 $11/page
Free title page
Free reference page
EssayTab is hands down the best essay writing service for college students. I was initially skeptical about the quality of a product that has such a low price point but I can tell you that it’s worth every penny! I’ve been using EssayTab for my essays in college as well as in grad school, and they always deliver excellent content.