Home python Employee Salary Calculation System python tkinter

# Employee Salary Calculation System python tkinter

2 min read
0
2,908

This tutorial will teach you  to calculating the employee salary using python projects GUI.Input the employee name and the basic salary calculate and display the netsalary using following condition.

if the basic salary is more than 50000 then include 10% tax.

if the basic salary is more than 30000 then include 5% tax.

otherwise no tax.

```from tkinter import *

def Ok():
result = float(e2.get())

if(result > 50000) :
tax = result * 10/100
elif(result > 30000) :
tax = result * 5/100
else :
tax = 0

taxText.set(tax)

nsal =  result - tax
nsalText.set(nsal)

root = Tk()
root.title("Employee Salary Calculation System")
root.geometry("300x400")

global e1
global e2

global taxText
global nsalText

taxText = StringVar()
nsalText = StringVar()

Label(root, text="Employee Name").place(x=10, y=10)
Label(root, text="Salary").place(x=10, y=40)
Label(root, text="Tax").place(x=10, y=80)
Label(root, text="Total:").place(x=10, y=110)

e1 = Entry(root)
e1.place(x=100, y=10)

e2 = Entry(root)
e2.place(x=100, y=40)

tax = Label(root, text="", textvariable=taxText).place(x=100, y=80)
nsal = Label(root, text="", textvariable=nsalText).place(x=100, y=110)

Button(root, text="Cal", command=Ok ,height = 1, width = 3).place(x=10, y=150)

empname = Entry(root)
empsal = Entry(root)

root.mainloop()```

• ### Python Introduction

Python is a world best programming language.in this tutorials we cover about the fundament…
• ### ATM Pin No Validation using Python

this is tutorial will explains how to do the ATM Pin No Validation using Python step by st…
• ### Chicken Shop Inventory using Python

The Inventory Management System is developed using Python. The project is built to manage …
Load More Related Articles
• ### Electricity Bill Calculation using Java Application

This tutorils teach Electricity Bill Calculating based on the below conditions step by ste…
• ### Banking Loan Calculation Project using Java

This tutorials series we are going to talk about how to make a banking loan calculation pr…
• ### Build Crud App with Laravel 11 and Vue.js

In this tutorial will teach Vue Laravel 10 CRUD using Vite step by step. Laravel  10 …
Load More By admin
• ### Django Vue.js Full Stack App

This  tutorial will teach you how to do the full stack development application using&…
• ### Django React Full Stack Project

This  tutorial will teach you how to do the full stack development application using&…
• ### Django Angular Full Stack Project

This  tutorial will teach you how to do the full stack development application using&…
Load More In python

## Electricity Bill Calculation using Java Application

This tutorils teach Electricity Bill Calculating based on the below conditions step by ste…