Saturday, May 25, 2019

WAP to input employee code, name and basic salary of an employee and calculate the following values

# HRA 40 % of basic salary
# DA 10 % of basic salary
# CCA 5 % of basic salary
# GS Basic + HRA + DA + CCA
# PF 10 % of GS
# IT 10 % of GS
# NS GS – (PF + IT)
#Display all the values.

EmployeeCode = int(input('Enter Employee Code = '))
EmployeeName = input('Enter Employee Name = ')
BasicSalary  = float(input('Enter Basic salary = '))
print('-'*10)
HRA = (BasicSalary * 40 ) / 100
DA = (BasicSalary * 10) / 100
CCA = (BasicSalary * 5) / 100
GS = BasicSalary + HRA + DA + CCA
PF = (GS * 10) / 100
IT = (GS * 10) / 100
NS = (GS - (PF + IT))

print('EmployeeCode = ' + str(EmployeeCode))
print('EmployeeName = ' + EmployeeName)
print('BasicSalary = ' + str(BasicSalary))
print('HRA = ' + str(HRA))
print('DA = ' + str(DA))
print('CCA = ' + str(CCA))
print('GS = ' + str(GS))
print('PF = ' + str(PF))
print('IT = ' + str(IT))
print('NS = ' + str(NS))

No comments:

Post a Comment