Calculate gross Salary coderinme

Calculate gross Salary coderinme

Calculate gross Salary
In order to compute the gross salary from the Basic Salary of a person, when given along with other allowances like
DA: Dear Allowance = some% of Basic Salary
TA: Travel Allowance = some% of Basic Salary
HRA: House Rent Allowance = some% of Basic Salary
We first calculate each allowance, and just have to add up them all using the following formula:
Gross Salary = BS + DA + TA + HRA
Now let’s code it in Python for the following query:
Find gross salary if basic salary 1500 HRA 500 DA 98%

#!/usr/bin/env python
sal=int(raw_input("Enter Employee's Basic Salary: "))
if sal < 1500 :
gs=sal * 0.10 +sal * 0.90 +sal
print 'The Gross Salary of Employee is :' ,gs
else:
gs=500 +sal * 0.98 +sal
print 'The Gross Salary of Employee is :',gs

For more programs on Python, visit our Python Coder Archives

Calculate gross Salary coderinme

All rights reserved. No part of this Post may be copied, distributed, or transmitted in any form or by any means, without the prior written permission of the website admin, except in the case of brief quotations embodied in critical reviews and certain other noncommercial uses permitted by copyright law. For permission requests, write to the owner, addressed “Attention: Permissions Coordinator,” to the admin @coderinme

Leave a reply:

Your email address will not be published.