I´m new to python and I have written this code but I´m getting an error I do not know how to resolve, could someone help me, please?
from tkinter import *
def calculations(entries):
shaftdia = float(entries['Shaft Diameter'].get())
outdia = 2 * shaftdia
thickfork = 0.75*shaftdia
thicksingleye = 1.75*shaftdia
diapin = shaftdia
diapincollar = 1.5*shaftdia
print("Outer diameter of eye: %f" % float(outdia))
print("Thickness of fork: %f" % float(thickfork))
print("Thickness of single eye: %f" % float(thicksingleye))
print("Diameter of pin: %f" % float(diapin))
print("Diameter of knuckle pin and collar: %f" % float(diapincollar))
master = Tk()
Label(master, text="Shaft Diameter").grid(row=0)
Label(master, text="Outer diameter of eye").grid(row=1)
Label(master, text="Thickness of fork").grid(row=2)
Label(master, text="Thickness of single eye").grid(row=3)
Label(master, text="Diameter of Pin").grid(row=4)
Label(master, text="Diameter of knuckle pin head and collar").grid(row=5)
e1 = Entry(master)
e2 = Entry(master)
e3 = Entry(master)
e4 = Entry(master)
e5 = Entry(master)
e6 = Entry(master)
e1.grid(row=0, column=50)
e2.grid(row=1, column=50)
e3.grid(row=2, column=50)
e4.grid(row=3, column=50)
e5.grid(row=4, column=50)
e6.grid(row=5, column=50)
Button(master, text='ACCEPT', command=calculations).grid(row=10, column=1,
sticky=W, pady=4)
master.mainloop( )
It is giving me this error on clicking on the button and I'm unable to resolve the error
Exception in Tkinter callback
Traceback (most recent call last):
File"C:\Users\kunal\AppData\Local\Programs\Python\Python37\lib\tkinter\__init__.py", line 1705, in __call__
return self.func(*args)
TypeError: calculations() missing 1 required positional argument: 'entries'
If there is any other error please tell because NOOB IN PYTHON