Python Programs

Python Program For Employee Salary Calculation

Last updated June 16, 2023 by Jarvis Silva

In this tutorial we will create a python program for employee salary calculation, this program will ask the employee for daily wage and number of work days then it will calculate the basic salary and deduct pf amount and print the total net salary so let’s code it.

Python Code To Calculate Employee Salary

daily_wage = int(input("Enter daily wage: "))
no_of_work_days = int(input("Enter number of work days: "))

basic_salary = daily_wage * no_of_work_days

# PF is taken as 15/100 = 15% you can take according to yours 
pf = salary * 0.15

total_salary = basic_salary - pf

print(f"Employee salary is {total_salary}")

Above is the complete code in python for employee salary calculation, In the code we take the daily wage and work days then we multiply them both to get basic salary then we calculate pf which is 15% of the basic salary then we print total salary by deducting pf.

You can run this program you need to have python installed on your computer, If you don’t have then follow this guide: Install and setup python on your computer or use this online python compiler.

After running this program you will asked to enter the daily wage and number of work days and then it will print the total salary, Below is an example output.

Enter daily wage: 500
Enter number of work days: 30
Employee salary is 12750.0

As you can see we successfully calculated the employee salary using python, I hope you found this tutorial helpful and useful, Do share this tutorial with your friends who might be interested in this program.

Here are some more python drawing tutorials for you:

I hope you found what you were looking for from this tutorial, and if you want more python programs and tutorials like this, do join our Telegram channel for future updates.

Thanks for reading, have a nice day 🙂