-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMath_Evaluation.py
More file actions
33 lines (23 loc) · 922 Bytes
/
Copy pathMath_Evaluation.py
File metadata and controls
33 lines (23 loc) · 922 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
from tkinter import *
root = Tk()
root.title("Evaluation")
root.geometry("700x400")
root.config(background="#dae6f6")
def Evaluation():
word = enter_text.get()
Ans = eval(word)
right = float(Ans
)
cs = Label(root, text="Answer is:", font=("poppins", 20), bg="#dae6f6", fg="#364971")
cs.place(x=100, y=250)
spell.config(text=right)
heading = Label(root, text="Math_Evaluation", font=("Trebuchet MS", 30, "bold"), bg="#dae6f6", fg="blue")
heading.pack(pady=(50, 0))
enter_text = Entry(root, justify="center", width=30, font=("poppins", 25), bg="white", border=2)
enter_text.pack(pady=10)
enter_text.focus()
button = Button(root, text="Solve", font=("arial", 20, "bold"), fg="white", bg="red", command=Evaluation)
button.pack()
spell = Label(root, font=("poppins", 20), bg="#dae6f6", fg="#364971")
spell.place(x=350, y=250)
root.mainloop()