Write a python program to calculate the salary of a medical representative considering the sales, bonus , icentives given to him are based on total sales. If sales exceed 100000 follow column 1 else follow column 2
Answers
Answer:
jananaan
Explanation:
ahhasjsjsksnsnsnsnsnskzk
Complete question:
Write a python program to calculate the salary of a medical representative considering the sales, bonus , incentives given to him are based on total sales. If sales exceed 100000 follow column 1 else follow column 2
COLUMN 1 COLUMN 2
Basic = Rs. 3000 Basic = Rs. 3000
HRA = 20% of basic HRA = 20% of basic
DA = 110% of basic DA = 110% of basic
Conveyance = Rs. 500 Conveyance = Rs. 500
Incentive = 10% of sales Incentive = 5% of sales
Bonus = Rs. 500 Bonus = Rs. 200
Answer:
#The python program to calculate the salary of a medical representative is as follows
#Variable initialization
sale = raw_input("Enter Total Sales in Rs. : ")
sale = int(sale)
#Condition evaluation
if sale >= 100000 :
bs = 3000
hra = 20 * bs/100
da = 110 * bs/100
cv = 500
incentive = sale * 10/100
bonus = 500
else:
bs = 3000
hra = 20 * bs/100
da = 110 * bs/100
cv = 500
incentive = sale * 5/100
bonus = 200
#Result
ts = bs + hra + da + cv + incentive + bonus
print "\nTotal Sales : %.2f"%(sale)
print "\nBasic Salary : %.2f"%(bs)
print "\nHra : %.2f"%(hra)
print "\nDa : %.2f"%(da)
print "\nConveyance : %.2f"%(cv)
print "\nIncentive : %.2f"%(incentive)
print "\nBonus : %.2f"%(bonus)
print "\nGross Salary : %.2f"%(ts)
Output:
Enter Total Sales in Rs. : 100000
Total Sales : 100000.00
Basic Salary : 3000.00
Hra : 600.00
Da : 3300.00
Conveyance : 500.00
Incentive : 10000.00
Bonus : 500.00
Gross Salary : 17900.00
#SPJ2