Professional Documents
Culture Documents
Micrpy
Micrpy
root=Tk()
root.geometry("800x600")
root.resizable(False, False)
root.title("Age Calculator")
#Label(root,height=25,width=50,text="Age Calculator",font=("Arial",20,"bold")).pack()
def calculateAge():
today=date.today()
Label(text="Name", font=23).place(x=200,y=250)
Label(text="Year", font=23).place(x=200,y=300)
Label(text="Month",font=23).place(x=200,y=350)
Label(text="Day", font=23).place(x=200,y=400)
nameValue = StringVar()
yearValue = StringVar()
monthValue= StringVar()
dayValue = StringVar()
nameEntry.place(x=300,y=250)
yearEntry.place(x=300,y=300)
monthEntry = Entry(root, textvariable=monthValue, width=30,bd=3,font=20)
monthEntry.place(x=300,y=350)
dayEntry.place(x=300,y=400)
Button(text="calculate
Age",font=20,bg="black",fg="white",width=11,height=2,command=calculateAge).place(x=300,y=450)
mainloop()