Simple Python Calculator with tkinter UI
Tkinter can be installed using pip. The following command is run in the command prompt to install Tkinter
pip install tk
Just run this code on code editor
from tkinter import * #import all from tkinter module
from math import *
def evaluate(event):
res.configure(text = "መልስ = " + str(eval(entry.get())))
w = Tk()
#Display የምሆኑ ፁሁፎች ናቸው
Label(w, text=" Python tkinter Calculator").pack()
Label(w, text="").pack()
Label(w, text=" ቀላል የሒሳብ Calculator ").pack()
Label(w, text=" ").pack()
Label(w, text=" ጥያቄውን ያስገቡ: ").pack()
#-----------------------------------
entry = Entry(w) #take inpute from user
entry.bind("<Return>", evaluate)
entry.pack()
res = Label(w)
res.pack()
w.mainloop() #end
That Can take Mathematical expression from user and return answer!!