Advertisement
al33kappa

Untitled

Jun 5th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. from tkinter import *
  2. root = Tk()
  3. def Fsolve():
  4. secondBox.delete(0,'end')
  5. a = int(textBox.get())
  6. deliteli = 0
  7. if (a<0):
  8. secondBox.insert(0,"����� �����������")
  9. btnSolve.configure(state=DISABLED)
  10. else:
  11. for i in range(2,a):
  12. if a%i==0:
  13. deliteli = i
  14. if (len(secondBox.get())>0):
  15. secondBox.insert(END, str(deliteli)+ ", ")
  16. else:
  17. secondBox.insert(END,str(deliteli)+", ")
  18. root.title("������� 224")
  19. chislo = IntVar
  20. chislo2 = IntVar
  21. lblChislo = Label(text="������� �����: ")
  22. lblChislo.grid(row=0,column=0)
  23. root.geometry("350x150")
  24. secondBox = Entry()
  25. secondBox.place(x = 130,y=37)
  26. lblSec = Label(text="���-�� ���������: ")
  27. lblSec.grid(padx = 10,pady = 10)
  28. textBox = Entry()
  29. textBox.grid(row=0,column=2)
  30. btnSolve = Button(text="�������",command = Fsolve)
  31. btnSolve.place(x=130,y=70)
  32. root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement