Saturday 3 August 2019

Assignment No : 01 Salary Calculation

'''
Assignment No: 1
To calculate salary of an employee given his basic pay (take as input from user).
Calculate gross salary of employee. Let HRA be 10 % of basic pay and TA be 5% of basic pay.
Let employee pay professional tax as 2% of total salary.
Calculate net salary payable after deductions.
'''
basic_pay = input("Enter your basic pay: ")
try:
basic_pay = float(basic_pay)
if basic_pay<0: # basic pay cannot be less than zero 
print("Basic pay can't be negative.")
exit()
hra = basic_pay*0.1 # hra is 10 % of basic pay
ta = basic_pay*0.05 # ta is 5 % of basic pay
total_salary = basic_pay + hra + ta
professional_tax = total_salary*0.02 # professional tax is 2 % of total salary
salary_payable = total_salary - professional_tax
print("Salary Payable is",salary_payable)
except ValueError:
print("Enter amount in digits.")

230 comments:

  1. Little bit hard... But understandable

    ReplyDelete
  2. Very nice and easy to understand
    Very nice experience with pyton

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. Teaching is nice and easy to understand.
    Language is hard...Not so hard.
    Nice experience.๐Ÿ‘๐Ÿ˜Š๐Ÿ‘Œ

    ReplyDelete
  5. Teaching is very nice.
    Also Python language some time hard but easy.
    Good experience with language and teaching is also so good.๐Ÿ‘Œ๐Ÿ‘Œ๐Ÿ˜Š๐Ÿ‘๐Ÿ‘

    ReplyDelete
  6. Teaching is very nice.
    Also Python language some time hard but easy.
    Good experience with language and teaching is also so good.๐Ÿ‘Œ๐Ÿ‘Œ๐Ÿ˜Š๐Ÿ‘๐Ÿ‘

    ReplyDelete
  7. Understood but to run the program was little bit difficult because too many errors were occuring.

    ReplyDelete
  8. Easy to understand but some time there is error when program to be run

    ReplyDelete
  9. Easy to understand but some time it's hard to run the program

    ReplyDelete
  10. This comment has been removed by the author.

    ReplyDelete
  11. Easy practical and better understanding

    ReplyDelete
  12. yes.I understand the given program

    ReplyDelete
  13. yes.I understand the given program

    ReplyDelete
  14. Today's practical was entreating....

    ReplyDelete
  15. This comment has been removed by the author.

    ReplyDelete
  16. This comment has been removed by the author.

    ReplyDelete
  17. Easy practical and this practical had increased my excitement for python language...

    ReplyDelete
  18. This comment has been removed by the author.

    ReplyDelete
  19. yes, i understood the given program

    ReplyDelete
  20. This is very easy to understand

    ReplyDelete
  21. Very well done sir ji.. .. ......... .easy to understand .......

    ReplyDelete
  22. I can understand that programme

    ReplyDelete
  23. It's easy program and easy to understand

    ReplyDelete
  24. I understand this program.

    ReplyDelete
  25. I understand this program.

    ReplyDelete
  26. Plzz make also in algorithm and flow chart for more convinience. Rather it was good.

    ReplyDelete
  27. Please make it's algorithm and flowchart for understanding

    ReplyDelete
  28. try:
    salary=float(input("Enter Your Salary "))
    hra=((salary/100)*10)
    ta=((salary/100)*5)
    gross_salary=salary+hra+ta
    print("Gross Salry is ",gross_salary)
    net_salary=(gross_salary)-((gross_salary/100)*2)
    print("Net Payable Salary is ",net_salary)

    except ValueError:
    print("Invalid Input")

    ReplyDelete
  29. Good understanding and easy program

    ReplyDelete
  30. program is easy understood

    ReplyDelete
  31. Understood sir๐Ÿคž๐Ÿคž๐Ÿ˜

    ReplyDelete
  32. Practical is easy understood

    ReplyDelete
  33. I understand the practical

    ReplyDelete
  34. practical was easy to understand

    ReplyDelete
  35. This comment has been removed by the author.

    ReplyDelete
  36. Learned The Fisrt Practical of Python programming

    ReplyDelete
  37. Practically is Too Easy to solve

    ReplyDelete
  38. B_25_ Kakade Siddharth Valmik
    Best way to learn Coding

    ReplyDelete
  39. B-56-Lalit Sambhaji Patil
    Easiest way to learn programming

    ReplyDelete
  40. B-24 Kakade Rahul
    Practical is most important for learning Python.

    ReplyDelete
  41. B-24 Kakade Rahul
    Practical is important for learning Python

    ReplyDelete
  42. B_13_Ghumare sonali Sudam
    Excellent python language

    ReplyDelete
  43. B-32-Gaurav kere
    Understood

    ReplyDelete
  44. B-11-Pratik Ghule
    Understood this program

    ReplyDelete
  45. B-1 shrutika gaikwad
    Understood

    ReplyDelete
  46. B 08 Pratik Gawand
    Understood sir

    ReplyDelete
  47. B-27 Komal Kapse
    Understood

    ReplyDelete
  48. B-18-Sakshi Handge
    Understood

    ReplyDelete
  49. B-21 Mansi jadhav
    Understood

    ReplyDelete
  50. B-15-soham gujrathi
    Understood

    ReplyDelete
  51. B-04- Prathamesh Ganore
    Understood

    ReplyDelete
  52. B-23-kadam tejashree
    Understood

    ReplyDelete
  53. B - 55 / Kalpesh patil
    Understood

    ReplyDelete
  54. B-20 LAVANYA JADHAV ... Good session ... concepts are clear but some doubt

    ReplyDelete
  55. B-40 kajal manik kokate....... Understand

    ReplyDelete
  56. This comment has been removed by the author.

    ReplyDelete
  57. B-46-Ankit Maurya
    Content is very useful, for getting started with programming language

    ReplyDelete
  58. B-48-Pooja Murkute
    Very useful

    ReplyDelete
  59. I understood this program very well.
    Thank you sir.

    ReplyDelete
  60. Understood very nice.thank you sir

    ReplyDelete
  61. B-29 Pooja kedar
    Thank you sir

    ReplyDelete
  62. Thanks for this but can i get flow chart for this question

    ReplyDelete
  63. Program was very amazing sir i completely understood๐Ÿ‘

    ReplyDelete
  64. Veri nicely understand
    C:36:Tamnar Sanket

    ReplyDelete
  65. Very nicely understand
    C:49: Valvi Vishal

    ReplyDelete
  66. C_19_Bhakti Shinde
    Understood

    ReplyDelete

Microsoft’s latest Surface Pro X is now available in India

  Microsoft Surface Pro X 2020 is now available in India at a starting price of Rs 1,49,999.  Here's everything you would like to unders...