Brak opisu

tt.py 695B

123456789101112131415161718192021222324
  1. from Tkinter import *
  2. def UPN():
  3. root.title('umgekehrte polnische Notation')
  4. root.resizable(False,False)
  5. root.geometry('400x500+200+100')
  6. UI = LabelFrame(root)
  7. UI.place(x = 1,y = 1,width = 398,height = 124)
  8. UPN.text = Text(UI)
  9. UPN.text.place(x=1,y=1,width=390,height=116)
  10. Li=[['7','8','9','+','DEL'],
  11. ['4','5','6','-','Enter'],
  12. ['1','2','3','*','='],
  13. ['0','00','.','/','Clear']]
  14. for i in range(len(Li[0])):
  15. for j in range(len(Li)):
  16. bt = Button(root)
  17. bt.place(x=(i+1)*60,y=120+(j+1)*60,width=50,height=50)
  18. bt['text'] = Li[j][i]
  19. bt.bind('<Button-1>',response,add=(root,))