0% found this document useful (0 votes)
90 views1 page

Employee Record Management Functions

The document outlines tasks for Mr. Ravi, a manager at a tech company, involving employee record management. It includes writing Python functions to input employee data into a binary file, update salaries for the IT department, count lines containing 'Python' in a text file, and manage employee records in a CSV file with functions to accept new records and calculate total salary expenses. The focus is on efficient data handling and record maintenance.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
90 views1 page

Employee Record Management Functions

The document outlines tasks for Mr. Ravi, a manager at a tech company, involving employee record management. It includes writing Python functions to input employee data into a binary file, update salaries for the IT department, count lines containing 'Python' in a text file, and manage employee records in a CSV file with functions to accept new records and calculate total salary expenses. The focus is on efficient data handling and record maintenance.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1)[Link] , a manager at a tech company needs to maintain records of employees.

Each
record should include:
Employee_ID,Employee_Name,Department and salary.
Write python functions to:
i)Input employee data and append it to a binary file.
ii)Update the salary of employees in the “IT” department to 200000.
2)Write a python function count_python_lines() that reads from a text file named “[Link]”
and counts the number of lines that contain the word “Python” (case sensitive).

3)Ravi is the HR manager of a company. To maintain employee records, he has created


a csv file named [Link],which stores the details of each employee.
The columns of the CSV file are: Employee_ID,Employee_Name, Department and salary.
Help him efficiently maintain the data by creating the following user defined functions.
a)accept()-to accept an employee record from the user and add it to the file
[Link].
b)CalculateTotalSalary()-to calculate and return the total salary expense by summing the
salary of all employees in the file.

You might also like