Files and Exceptions

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…

20% OFF on your first order








Let’s Get Started

Team with top experts around the globe to succeed in learning


How it works

If you are looking for the best essay writing services for cheap, then you have come to the right place. specializes in custom academic papers for all levels of students. From high school students to college graduates and undergraduates, all the way up to university students at master’s degree and even doctoral levels.

Place an order

Fill out the order form. Attach any custom instructions.

Make Payment

Pay online safely with major platforms.

Writing Process

We’ll assign your paper to the most suitable writer & editor.

Get your Order

Once complete, we’ll send the paper to your email.