-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathAssignment16.py
More file actions
26 lines (22 loc) · 784 Bytes
/
Assignment16.py
File metadata and controls
26 lines (22 loc) · 784 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Employee_id = 1001
Basic_salary = 15000
Allowances = 6000
Income_tax = 0
print("Employee id: %d" %Employee_id)
print("Basic salary: %f" %Basic_salary)
print("Allowances : %f" %Allowances)
Gross_Salary=Basic_salary+Allowances
print("Gross salary: %f" %Gross_Salary)
if(Gross_Salary < 5000):
print("Income tax: %f" %Income_tax)
elif(Gross_Salary > 5000 and Gross_Salary > 10000):
Income_tax = Gross_Salary*0.1
print("Income tax: %f" %Income_tax)
elif(Gross_Salary > 10000 and Gross_Salary > 20000):
Income_tax = Gross_Salary*0.2
print("Income tax: %f" %Income_tax)
elif(Gross_Salary > 20000):
Income_tax = Gross_Salary*0.3
print("Income tax: %f" %Income_tax)
Net_Salary=Gross_Salary-Income_tax
print("Net salary: %f" %Net_Salary)