Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I Want solution of this code using Python without using Lists and using csv Library ONLY Given the following data: Adam Saleet, IT Support, 1000
I Want solution of this code using Python without using Lists and using csv Library ONLY
Given the following data: Adam Saleet, IT Support, 1000 Naji Shemmari, Registrar, 1250 Bilal Tweijari, Instructor 2000 Abdallah Mazem, Accountant, 1000 Nizar Hachem, Instructor, 1800 Nawwara Sleiman, Admission, 900 Ameen Sinjer, QA Officer, 1400 Walaa Saeed, Instructor, 1900 Hamid Shami, IT Support,850 Nadine Khattar, Instructor, 1480 Using only the "csv" library, you are asked to do the following: a- Create a text file, SP21-Emp1.txt, and copy the above contents to it. b- Write a python program that does the following: 1- Read the lines of the file SP21-Emp1.txt using a loop. 2- For each line read, you have to split and get the name, job, and income. 3- The name should also be split into first and last. 4- Calculate the final income for each record given that a bonus of 10% of the income is awarded to each employee. 5- Print the records of only the instructors and their average salaries at the end as shown below. 6- Include proper screenshots of the code and the output. Important Notes: 1 - You are not allowed to use Lists. 2- The whole program should include one loop and one If statement. 3- The format of the output should be identical to the given one. 4- The screenshots should also show part of your desktop in addition to the code/output. Expected Output: Reading from file SP21-Emp1.txt Name: Tweijari, Bilal Name: Hachem, Nizar Name: Saeed, Walaa Name: Khattar, Nadine Job: Instructor Job: Instructor Job: Instructor Job: Instructor Income: $2200.0 Income: $1980.0 Income: $2090.0 Income: $1628.0 The average of the instructors' salaries is: 1974.5 End of AssessmentStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started