try:
Defin=dictionary[textent]
except:
Defin="check your spellings well"
display.insert(END, Defin)
def close():
close=tkinter.messagebox.askyesno("exit dictionary", "CONFIRM TO EXIT!!!!")
if close > 0:
window.destroy()
return
window = Tk()
window.title("dictionary")
window.configure(background= "orange")
Label(window, text="Type text to be defined", bg="black", fg="white").grid(row=0,column=0,stick=W)
text = Entry(window, width=70, bg="white")
text.grid(row=1,column=0,sticky=W)
Button(window, text="SUBMIT", bg="black", width=6, fg="white", command=click).grid(row=2,column=0,stick=W)
Label(window, text="\nDefinition:", bg="black", fg="white",font="non 12 bold").grid(row=3,column=0,stick=W)
display = Text(window, width=100, height=10, bg="white",)
display.grid(row=4,column=0,sticky=W)
dictionary = {
'writer':'Word press has made it easy to start a blog. '
'After you have created a blog as a blogger, '
'the next challenge is getting more clients to earn you more money. '
'Don’t feel as if it is difficult to get more traffic to your blog, in this article I will be listing '
'some important and tested practices you can use to increase your blog traffic.'
}
close =Button(window, text="EXIT", bg="black", width=6, fg="white", command=close).grid(row=5,column=0,stick=W)
close=Button(window, text="YES", bg="black", width=6, fg="white", command=close).grid(row=5,column=0,stick=E)