0% found this document useful (0 votes)
5 views2 pages

Python Final 4

The document outlines a final test for Python basics, focusing on a payroll task that requires creating and managing employee, department, and place data. It includes calculations for various salary components, deductions, and net salary, as well as instructions for outputting results to a text file and performing analysis on that data. The test assesses skills in file handling, data mapping, and salary computation in Python.
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)
5 views2 pages

Python Final 4

The document outlines a final test for Python basics, focusing on a payroll task that requires creating and managing employee, department, and place data. It includes calculations for various salary components, deductions, and net salary, as well as instructions for outputting results to a text file and performing analysis on that data. The test assesses skills in file handling, data mapping, and salary computation in Python.
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
You are on page 1/ 2

Python Basics Final Test

Marks: 50 Duration: 120 mins

Pay roll Task


Create the following files:

Empmaster:

empid, empname, dno, gender, placecode, basicsalary

Enter minimum 10 employees

departmentmaster:

dno, dname

11,HR
12,Technical
13,Accounts
14,Network
15,Test

placemaster :

placecode, place

101,Hassan
102,Bangalore
103,Mysore
104,Mangalore
105,Shimoga

Work to do:

Map idplace file to get the placename based on placecode

Map departmentmaster file to get the departmentname based dno


Calculate the following:

HRA : 10% of Basic Salary

DA : 5% of Basic Salary

CCA : 5% of Basic Salary

Gross Salary : Basicsalary + hra + da + cca

PF : 5% of Basic Salary

PT : 500

IncomeTax :

if salary >=50000 10% of BasicSalary

if salary < 50000 5% of BasicSalary

TotalDeduction = PF + PT + IT

Net Salary = GrossSalary - TotalDeduction

Output:

empid, empname, gender, department, place, basicsalary, hra,da,cca, grosssalary,


pf,pt,incometax,totaldeduction,netsalary

Write the output to the Payroll_Jan.txt file.

Read Payroll_Jan.txt and do the following analysis:

1. Find the Total Gross Salary, deduction and net salary department wise.
2. Find the highest taxpayer department wise
3. Find for which department highest number of people coming out of Hassan
4. Find the highest salary taken by Hassan employees
5. Find the number of employees based on department, place wise.

You might also like