import tkinter as tk
class Programm(tk.Tk):
def __init__(self):
super().__init__()
self.title("Сумма квадратов")
self.label1=tk.Label(self,text="Введите кол-во дней:").grid(row=0,column=0)
self.input=tk.Entry(self)
self.input.grid(row=0,column=1)
self.button= tk.Button(self, text="Посчитать", command=self.clicked,width=40).grid(row=1,columnspan=2)
self.label2=tk.Label(self, text="")
self.label2.grid(row=2,columnspan=2)
def clicked(self):
if self.input.get()=="20":
txt="22000"
elif int(self.input.get())<10:
txt=str(20000*0.4)
else: txt="20000"
self.label2["text"]=txt
if __name__ == "__main__":
app=Programm()
app.mainloop()