forked from Arvindvishwakarma/Multiplication-Table-Python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmultiplication table.py
More file actions
40 lines (24 loc) · 836 Bytes
/
multiplication table.py
File metadata and controls
40 lines (24 loc) · 836 Bytes
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
from tkinter import *
def MulTable():
print("\n")
print("Table")
for x in range(1,11):
m = int(EnterTable.get())
print((x), 'once the', (m), '=', (x*m))
win = Tk()
win.geometry('200x200')
win.title('Multiplication Table')
EnterTable = StringVar()
label = Label(win, text='Table', font=30, fg='Black')
label.grid(row=1,column=6)
label = Label(win, text=' ')
label.grid(row=2,column=6)
entry = Entry(win, textvariable=EnterTable, justify='center')
entry.grid(row=2,column=6)
button = Button(win, text='Table', command=MulTable)
button.grid(row=5,column=6)
label = Label(win, text=' ')
label.grid(row=4,column=6)
QUIT=Button(win, text='Exit', command=win.destroy)
QUIT.grid(row=6,column=6)
win.mainloop()