Gross Salary from Basic Salary coderinme

Gross Salary from Basic Salary coderinme

Gross Salary from Basic 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:
Write a shell script for finding Gross Salary of Ramesh if DA and HRA is 40% and 20%


#!/usr/bin/env python
bs_sal=int(raw_input('Enter Basic Salary: '))
t_sal = bs_sal + bs_sal * .40 + bs_sal * .20
print ("The Gross Salary will be: " + str(t_sal))

For more programs on Python, visit our Python Coder Archives

Gross Salary from Basic Salary

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.