diff --git a/Calculator [GUI]/script.py b/Calculator [GUI]/script.py index d55dcd88f8..6e9855ffce 100644 --- a/Calculator [GUI]/script.py +++ b/Calculator [GUI]/script.py @@ -1,7 +1,8 @@ from tkinter import * window=Tk() window.title("Standard Calculator") -window.resizable(0,0) +window.resizable(900,500) +window.geometry("600x400") def func1(): s=e1_val.get() @@ -163,58 +164,58 @@ def func17(): e1.insert(END,"+") e1_val=StringVar() -e1=Entry(window,textvariable=e1_val,width=40) +e1=Entry(window,textvariable=e1_val,width=80) e1.grid(row=0,column=0,columnspan=3) -clear=Button(window,text="Clear",width=8,height=2,command=func1) +clear=Button(window,text="Clear",width=5,height=2,command=func1,fg='black', bg='yellow') clear.grid(row=0,column=3) -b2=Button(window,text="7",width=8,height=4,command=func2) +b2=Button(window,text="7",width=18,height=4,command=func2,fg='black', bg='yellow') b2.grid(row=1,column=0) -b2=Button(window,text="8",width=8,height=4,command=func3) +b2=Button(window,text="8",width=18,height=4,command=func3,fg='black', bg='yellow') b2.grid(row=1,column=1) -b2=Button(window,text="9",width=8,height=4,command=func4) +b2=Button(window,text="9",width=18,height=4,command=func4,fg='black', bg='yellow') b2.grid(row=1,column=2) -b2=Button(window,text="/",width=8,height=4,command=func5) +b2=Button(window,text="/",width=5,height=4,command=func5,fg='black', bg='yellow') b2.grid(row=1,column=3) -b2=Button(window,text="4",width=8,height=4,command=func6) +b2=Button(window,text="4",width=18,height=4,command=func6,fg='black', bg='yellow') b2.grid(row=2,column=0) -b2=Button(window,text="5",width=8,height=4,command=func7) +b2=Button(window,text="5",width=18,height=4,command=func7,fg='black', bg='yellow') b2.grid(row=2,column=1) -b2=Button(window,text="6",width=8,height=4,command=func8) +b2=Button(window,text="6",width=18,height=4,command=func8,fg='black', bg='yellow') b2.grid(row=2,column=2) -b2=Button(window,text="X",width=8,height=4,command=func9) +b2=Button(window,text="X",width=5,height=4,command=func9,fg='black', bg='yellow') b2.grid(row=2,column=3) -b2=Button(window,text="1",width=8,height=4,command=func10) +b2=Button(window,text="1",width=18,height=4,command=func10,fg='black', bg='yellow') b2.grid(row=3,column=0) -b2=Button(window,text="2",width=8,height=4,command=func11) +b2=Button(window,text="2",width=18,height=4,command=func11,fg='black', bg='yellow') b2.grid(row=3,column=1) -b2=Button(window,text="3",width=8,height=4,command=func12) +b2=Button(window,text="3",width=18,height=4,command=func12,fg='black', bg='yellow') b2.grid(row=3,column=2) -b2=Button(window,text="-",width=8,height=4,command=func13) +b2=Button(window,text="-",width=5,height=4,command=func13,fg='black', bg='yellow') b2.grid(row=3,column=3) -b2=Button(window,text="0",width=8,height=4,command=func14) +b2=Button(window,text="0",width=18,height=4,command=func14,fg='black', bg='yellow') b2.grid(row=4,column=0) -b2=Button(window,text=".",width=8,height=4,command=func15) +b2=Button(window,text=".",width=18,height=4,command=func15,fg='black', bg='yellow') b2.grid(row=4,column=1) -b2=Button(window,text="=",width=8,height=4,command=func16) +b2=Button(window,text="=",width=18,height=4,command=func16,fg='black', bg='yellow') b2.grid(row=4,column=2) -b2=Button(window,text="+",width=8,height=4,command=func17) +b2=Button(window,text="+",width=5,height=4,command=func17,fg='black', bg='yellow') b2.grid(row=4,column=3) window.mainloop()