Practical Using Selection
Practical Using Selection
Task1:
Write a python program to read employee number , name , job, years of experience and salary then
calculate the bonus using following conditions:
Salary Bonus
>=15000 12 % of salary
Note: The above bonus is applicable , if the employee working experience is 5 years or more.
Otherwise bonus is 500.
Print Employee payslip in the proper format (including all details – line by line)
if years_of_experience>=5:
if salary>=25000:
bonus=(50/100)*salary
elif salary>=20000:
bonus=(25/100)*salary
elif salary>=15000:
bonus=(12/100)*salary
elif salary>=10000:
bonus=(10/100)*salary
else:
bonus=(5/100)*salary
else:
bonus=500
print("bonus=",bonus)
Task2:
Write a python program to read product code, name, product type ,qty, price,
The input of product type should be either (garments/ food/ house hold)
>=1000 150
>=500 120
>=300 100
>=100 50
<100 10
**********************************************
Bill Amount
**********************************************
Price: <price>
Qty : <qty>
Discount:<discount>
Net Price:<netprice>
**********************************************
**********************************************