Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6478f54

Browse files
The first ever commit made by me
0 parents commit 6478f54

File tree

373 files changed

+102873
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

373 files changed

+102873
-0
lines changed

‎.idea/hello.iml‎

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.idea/misc.xml‎

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.idea/modules.xml‎

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.idea/workspace.xml‎

Lines changed: 455 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎all airtmatics.py‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
x = int(input("enter the first num"))
2+
y = int(input("enter the second number"))
3+
4+
sum = x+y
5+
sub = x-y
6+
product = x*y
7+
div = x/y
8+
9+
print("The sum of the numbers is "+ str(sum))
10+
print("the difference of the numbers is "+ str(sub))
11+
print("the product of the numbers is "+ str(product))
12+
print("the division of the numbers is "+ str(div))

‎ascii.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
x = input("enter any character")
2+
y = ord(x)
3+
print("ascii value is: " + str(y))

‎bill.py‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
x = input("enter the name of the item: ")
2+
y = float(input("enter the quantity: "))
3+
z = float(input("enter the price per unit: "))
4+
money = y*z
5+
print("***********************************BILL***********************************")
6+
print(str(x)+ " "+"Quantity: "+str(x)+" "+"Price: "+str(z))
7+
print(" ")
8+
print("**************************************************************************")
9+
print("Total Amount: " + str(money))
10+
print("**************************************************************************")

‎float to int.py‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
x = float(input("enter any number"))
2+
y = float(input("enter the second number"))
3+
print("the value of first num is: "+str(x))
4+
print("the value of second number is: "+str(y))
5+
print("the sum of the numbers is: " + str(int(x+y)))
6+
7+
# =================================SIMPLE INTEREST=======================================================
8+
principal = x
9+
rate = y
10+
time = int(input("Enter time in years"))
11+
SI = principal * rate * time/100
12+
print(SI)
13+
14+
15+
# ===================================power================================================================
16+
17+
a = int(input("enter the number"))
18+
b = int(input("enter the power"))
19+
power = a**b
20+
print("the power is given as " + str(power))

‎float.py‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
x = float(input("enter the first num"))
2+
y = float(input("enter the second number"))
3+
4+
sum = x+y
5+
sub = x-y
6+
product = x*y
7+
div = x/y
8+
9+
print("The sum of the numbers is "+ str(sum))
10+
print("the difference of the numbers is "+ str(sub))
11+
print("the product of the numbers is "+ str(product))
12+
print("the division of the numbers is "+ str(div))

‎hello.py‎

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
import time
2+
import datetime
3+
from tkinter import *
4+
5+
root = Tk()
6+
root.title("Payment System")
7+
8+
9+
Tops = Frame(root, width=1350, height=50, bd=8, relief="raise")
10+
Tops.pack(side=TOP)
11+
12+
f1 = Frame(root, width=600, height=600, bd=8, relief="raise")
13+
f1.pack(side=LEFT)
14+
15+
f2 = Frame(root, width=300, height=700, bd=8, relief="raise")
16+
f2.pack(side=RIGHT)
17+
18+
f1a = Frame(f1, width=600, height=200, bd=20, relief="raise")
19+
f1a.pack(side=TOP)
20+
21+
f1b = Frame(f1, width=600, height=600, bd=20, relief="raise")
22+
f1b.pack(side=TOP)
23+
24+
lblinfo = Label(Tops, font=("arial", 60, 'bold'), text=" Payment Management ")
25+
lblinfo.grid(row=0, column=0)
26+
27+
28+
def iExit():
29+
qExit = messagebox.askyesno("Payment System", "Do you want to exit")
30+
if qExit > 0:
31+
root.destroy()
32+
return
33+
34+
35+
def Reset():
36+
Name.set("")
37+
Address.set("")
38+
HoursWorked.set("")
39+
wageshour.set("")
40+
Payable.set("")
41+
Taxable.set("")
42+
NetPayable.set("")
43+
GrossPayable.set("")
44+
OvertimeHours.set("")
45+
Employer.set("")
46+
NINumber.set("")
47+
txtPlaySlip.delete("1.0", END)
48+
49+
50+
def EnterInfo():
51+
txtPlaySlip.insert(END, "\t\tPaySlip\n\n")
52+
txtPlaySlip.insert(END, "Name: \t\t" + Name.get() + "\n\n")
53+
txtPlaySlip.insert(END, "Address: \t\t" + Address.get() + "\n\n")
54+
txtPlaySlip.insert(END, "Employer: \t\t" + Employer.get() + "\n\n")
55+
txtPlaySlip.insert(END, "NINumber: \t\t" + NINumber.get() + "\n\n")
56+
txtPlaySlip.insert(END, "Hours Worked: \t\t" + HoursWorked.get() + "\n\n")
57+
txtPlaySlip.insert(END, "NetPayable: \t\t" + NetPayable.get() + "\n\n")
58+
txtPlaySlip.insert(END, "wages per hour: \t\t" + wageshour.get() + "\n\n")
59+
txtPlaySlip.insert(END, "Tax Paid: \t\t" + Taxable.get() + "\n\n")
60+
txtPlaySlip.insert(END, "Payable: \t\t" + Payable.get() + "\n\n")
61+
62+
def WeeklyWages():
63+
HoursWorkedPerWeek = float(HoursWorked.get())
64+
WagesPerHours = float(wageshour.get())
65+
66+
paydue = WagesPerHours * HoursWorkedPerWeek
67+
paymentDue = "$", str("%.2f" %(paydue))
68+
Payable.set(paymentDue)
69+
70+
tax = paydue*0.2
71+
Taxables = "$", str("%.2f" %(tax))
72+
Taxable.set(Taxables)
73+
74+
netpay = paydue - tax
75+
NetPays = "$", str("%.2f" % (netpay))
76+
NetPayable.set(NetPays)
77+
78+
if HoursWorkedPerWeek > 40:
79+
overTimeHours = (HoursWorkedPerWeek-40) + WagesPerHours * 1.5
80+
Overtimehrs = "$", str("%.2f" % (overTimeHours))
81+
OvertimeHours.set(Overtimehrs)
82+
83+
elif HoursWorkedPerWeek <= 40:
84+
overTimePay = (HoursWorkedPerWeek-40) + WagesPerHours * 1.5
85+
Overtimehrs = "$", str("%.2f" % (overTimePay))
86+
OvertimeHours.set(Overtimehrs)
87+
88+
return
89+
90+
# =============================================Variables=========================================================
91+
92+
Name = StringVar()
93+
Address = StringVar()
94+
HoursWorked = StringVar()
95+
wageshour = StringVar()
96+
Payable = StringVar()
97+
Taxable = StringVar()
98+
NetPayable = StringVar()
99+
GrossPayable = StringVar()
100+
OvertimeHours = StringVar()
101+
Employer = StringVar()
102+
NINumber = StringVar()
103+
TimeOfOrder = StringVar()
104+
DateOfOrder = StringVar()
105+
106+
DateOfOrder.set(time.asctime(time.localtime(time.time())))
107+
108+
# ========================================Label Widget==========================================================
109+
110+
lblName = Label(f1a, text="Name", font=("arial", 16, 'bold'), bd=20).grid(row=0, column=0)
111+
lblAddress = Label(f1a, text="Address", font=("arial", 16, 'bold'), bd=20).grid(row=0, column=2)
112+
lblEmployer = Label(f1a, text="Employer", font=("arial", 16, 'bold'), bd=20).grid(row=1, column=0)
113+
lblNINumber = Label(f1a, text="NINumber", font=("arial", 16, 'bold'), bd=20).grid(row=1, column=2)
114+
lblHoursWorked = Label(f1a, text="Hours Worked", font=("arial", 16, 'bold'), bd=20).grid(row=2, column=0)
115+
lblHourlyRate = Label(f1a, text="Hourly Rate", font=("arial", 16, 'bold'), bd=20).grid(row=2, column=2)
116+
lblTax = Label(f1a, text="Tax", font=("arial", 16, 'bold'), bd=20).grid(row=3, column=0)
117+
lblOvertime = Label(f1a, text="Overtime", font=("arial", 16, 'bold'), bd=20).grid(row=3, column=2)
118+
lblGrossPay = Label(f1a, text="GrossPay", font=("arial", 16, 'bold'), bd=20).grid(row=4, column=0)
119+
lblNetPay = Label(f1a, text="NetPay", font=("arial", 16, 'bold'), bd=20).grid(row=4, column=2)
120+
121+
122+
# =========================================Entry Widget===========================================================
123+
124+
etxtName = Entry(f1a, textvariable=Name, font=("arial", 16, 'bold'), bd=16, width=22, justify="left")
125+
etxtName.grid(row=0, column=1)
126+
etxtAddress = Entry(f1a, textvariable=Address, font=("arial", 16, 'bold'), bd=16, width=22, justify="left")
127+
etxtAddress.grid(row=0, column=3)
128+
etxtEmployer = Entry(f1a, textvariable=Employer, font=("arial", 16, 'bold'), bd=16, width=22, justify="left")
129+
etxtEmployer.grid(row=1, column=1)
130+
etxtHoursWorked = Entry(f1a, textvariable=HoursWorked, font=("arial", 16, 'bold'), bd=16, width=22, justify="left")
131+
etxtHoursWorked.grid(row=2, column=1)
132+
etxtWagesPerHours = Entry(f1a, textvariable=wageshour, font=("arial", 16, 'bold'), bd=16, width=22, justify="left")
133+
etxtWagesPerHours.grid(row=2, column=3)
134+
etxtninoW = Entry(f1a, textvariable=NINumber, font=("arial", 16, 'bold'), bd=16, width=22, justify="left")
135+
etxtninoW.grid(row=1, column=3)
136+
etxtGrossPay = Entry(f1a, textvariable=Payable, font=("arial", 16, 'bold'), bd=16, width=22, justify="left")
137+
etxtGrossPay.grid(row=4, column=1)
138+
etxtNetPay = Entry(f1a, textvariable=NetPayable, font=("arial", 16, 'bold'), bd=16, width=22, justify="left")
139+
etxtNetPay.grid(row=4, column=3)
140+
etxtTax = Entry(f1a, textvariable=Taxable, font=("arial", 16, 'bold'), bd=16, width=22, justify="left")
141+
etxtTax.grid(row=3, column=1)
142+
etxtOvertime = Entry(f1a, textvariable=OvertimeHours, font=("arial", 16, 'bold'), bd=16, width=22, justify="left")
143+
etxtOvertime.grid(row=3, column=3)
144+
145+
146+
# ==========================================Text Widget============================================================
147+
148+
lblPaySlip = Label(f2, font=("arial", 16, 'bold'), textvariable=DateOfOrder).grid(row=0, column=0)
149+
txtPlaySlip = Text(f2, height=22, width=34, bd=16, font=("arial", 16, 'bold'))
150+
txtPlaySlip.grid(row=1, column=0)
151+
152+
153+
# ===========================================Buttons=============================================================
154+
155+
btnSalary = Button(f1b, text="Weekly Salary", padx=16, pady=16, bd=8, fg="black", font=("arial", 16, 'bold'),
156+
width=14, height=1, command=WeeklyWages).grid(row=0, column=0)
157+
158+
btnReset = Button(f1b, text="Reset", padx=16, pady=16, bd=8, fg="black", font=("arial", 16, 'bold'),
159+
width=14, height=1, command=Reset).grid(row=0, column=1)
160+
161+
btnPaySlip = Button(f1b, text="View Payslip", padx=16, pady=16, bd=8, fg="black", font=("arial", 16, 'bold'),
162+
width=14, height=1, command=EnterInfo).grid(row=0, column=2)
163+
164+
btnExit = Button(f1b, text="Exit System", padx=16, pady=16, bd=8, fg="black", font=("arial", 16, 'bold'),
165+
width=14, height=1, command=iExit).grid(row=0, column=3)
166+
167+
root.mainloop()

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /