Question: Assessment Explanation: TASK 1 : 1 . Write Input Files: First, create input files for each department. Each file should be named using the format
Assessment Explanation: TASK: Write Input Files: First, create input files for each department. Each file should be named using the format "DEPARTMENTCODE.txt where "DEPARTMENT" is the department name and "CODE" is a unique identifier. Each file will contain revenue contributions from Quarter out of Quarter out of Quarter out of and Quarter out of along with an employee ID Each line represents the revenue contributions for a specific employee within that department. Read Input Files and Process Data: Using the provided code, read the input files. For each department, calculate: The average revenue for each quarter. The number of employees who did not meet the annual revenue target of $ Write Output Files: Based on the processed data, generate the following output files for each department: Average Revenue File DEPARTMENTCODEavg.txt: Contains the average revenue for each quarter. Failed Employees File DEPARTMENTCODEfailed.txt: Lists the employee IDs of those who did not meet the annual revenue target. Notes: Replace "DEPARTMENT" with the actual department name and "CODE" with the unique identifier for each department. You can create more than two departments. The number of output files will correspond to the number of departments you include. In Google Colab, the default working directory is content unless you have not changed it previously If you use osgetcwd then it will also return you the current working director and by default it is content In your assignment, when you will need to read the files to calculate the average and the number of employees not meeting the target then you need to provide the path so that program will first go on that path and will read your just written files to pick the values from there to perform the calculations. So for that purpose you need to provide the path and as mentioned, by default it is content so you will provide that. Programming Fundamentals ICT Kings Own Institute Dr Rabia Bashir TASK: You need to upload the file financialreport.txt in your current working directory before performing any operation. I have explained in detail about file uploading in file handling helping material file.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
