jilorunner.blogg.se

Python program to calculate salary of an employee
Python program to calculate salary of an employee







python program to calculate salary of an employee

The wide variety of widgets allows creating a user-friendly interface that allows to access the application easily. Python Tkinter allows python developers to write GUI-based software. and in the end, the net salary in hand is calculated. The information is divided into 2 sections – Employee information and Deductions. In the below output, the user has provided the first 6 inputs rest of everything is generated by the application. # display information using formatted string Total_deduction = s3_contrib + phealth + hloan + tax S3_contrib = float(input('SSS Contribution: '))

  • Subtract total dedcution from gross salary to get the net salary information.ĭuty = float(input('Duty (No.
  • Adding up of SSS contribution, phil health, house loan and tax will give the total deduction.
  • Number of days duty server times rate per hour will produce gross salary of an employee.
  • Like in the below code we converted user inputs to float data type.
  • By adding data type name before input() method we can convert the user input into data type of preference.
  • Input provided by the user is by default in string data type.

    python program to calculate salary of an employee

    In the below source code, the python input() method is used to take user inputs. Using this information, a payslip is generated that has employee information with all the deductions and in the end, net salary is displayed. Payslip application accepts employee details like name, working hours, rate per hour, sss contribution, Phil health, and housing loan.

    #Python program to calculate salary of an employee how to#

    Simple payslip application using python tkinterĪlso, check out, How to convert Python file to exe using Pyinstaller Simple Payslip application using python console.Simple Payslip application using python console.









    Python program to calculate salary of an employee