I joined the forum hoping to find someone who would help me.

I am writing small program in python with GUI, and what it should actually do is , using my math formula to calculate the deflektion of one simple beam. My problem is that i dont know how to define my formula in python..

The formula is : W=5/384 x ((q x l^4)/(Emodul x T))

This is what i managed to write so far:

- Code: Select all
`from tkinter import *`

from math import*

a=Tk()

a.title("AG013211585")

a.geometry("500x500")

bild=PhotoImage(file="Unbenannt2.gif")

Label(image=bild,width=500).grid(row=0,column=0,columnspan=3)

Label(text="q= ").grid(row=1, column=0, sticky="e")

EP=Entry(width=20)

EP.grid(row=1,column=1,sticky="we")

Label (text="Kn/m").grid(row=1,column=2,sticky="w")

Label(text="l= ").grid(row=2, column=0, sticky="e")

EP=Entry(width=20)

EP.grid(row=2,column=1,sticky="we")

Label (text="m").grid(row=2,column=2,sticky="w")

Label(text="Emodul= ").grid(row=3, column=0, sticky="e")

EP=Entry(width=20)

EP.grid(row=3,column=1,sticky="we")

Label (text="N\m²").grid(row=3,column=2,sticky="w")

Label(text="I=").grid(row=4, column=0, sticky="e")

EP=Entry(width=20)

EP.grid(row=4,column=1,sticky="we")

Label (text="m^4").grid(row=4,column=2,sticky="w")

b1=Button(text="berechnen")

b1.grid(row=5, column=1,columnspan=1,sticky="we")

a.mainloop()