from tkinter import *
from tkinter.simpledialog import askinteger
class learn():
def __init__(self, root):
self.root=root
self.root.title("Hancie e-Learning Studio")
self.root.geometry("500x400")
def dialog():
prompt = askinteger("Input", "Input an Integer")
print(prompt)
btn=Button(self.root,command=dialog, text="Open dialog")
btn.pack()
if __name__=='__main__':
root=Tk()
learn(root)
root.mainloop()
Output