-
Notifications
You must be signed in to change notification settings - Fork 0
/
les11.py
69 lines (61 loc) · 1.56 KB
/
les11.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
from tkinter import *
window = Tk()
# window.geometry("1280x720")
# def plus():
# numA=0
# numB=0
# try:
# numA = int(a.get())
# numB = int(b.get())
# except:
# print("Number error")
# return
# label["text"] = str(numA+numB)
# def keer():
# numA = 0
# numB = 0
# try:
# numA = int(a.get())
# numB = int(b.get())
# except:
# print("Number error")
# return
# label["text"] = str(numA * numB)
#
#
# label = Label(master = window,text="Antwoord=0",background="#ffef08",
# foreground='#2130ff',font=("Arial",20,'bold'),width=20,height=2)
# label.pack()
def onclick(waarde):
label["text"]= waarde
pass
num = 1
button = Button(master=window,text=num,font=("Arial",30),command=lambda waarde = num: onclick(waarde) )
label = Label(master=window,text="Hoi",font=("Arial",30))
label.pack()
button.pack()
# b = 4
# h =3
#
# for rij in (range(h)):
# for kolom in range(b):
# num = (kolom+1)+(rij*b)
#
# label = Label(master=window,text=str(num),font=("Arial",40))
# label.grid(row= rij,column = kolom,pady = 5,padx= 5)
# top = Frame(master = window,background="red")
# top.pack(fill="x")
#
# button1 = Button(master=top,text="Button1")
# button1.pack(side =LEFT)
#
# a = Entry(master=window, font =("Arial",40))
# b = Entry(master=window, font =("Arial",40))
# a.pack(pady=20)
# b.pack()
#
# plus = Button(master=window,text="PLUS",command=plus)
# keer = Button(master=window,text="KEER",command=keer)
# plus.pack()
# keer.pack()
window.mainloop()