Python Tkinter in Hindi – Gui Calculator in Python tkinter

Python

]Gui Calculator in python :- Python Gui Calculator Kese Banante hai ye hamne is post me ek ek point understand kiya hai.Simple Gui Calculator ko aap ek dam aashan se bana sakte hai.

A to Z Tkinter Tutorial :- Python Tkinter

Gui Calculator in python

Hello Friends Me Aapko Aaj Simple Calculator banane ke Bare me batane wala hu Jisse aap Gui Programming Learn kar Sakte Hai.

Simple Gui Calculator in python

Simple Gui Calculator in python
Simple Gui Calculator in python

Simple Calculator kese banate hai python me ham ye is post me learn karte hai . agar aap bhi learn karna chahte hai to ye post ko read kre |

Python Me Gui Application ko create karne ke liye pycharm ka use hota hai. agar aapke pass pycharm software nhi hai to pahle aap download karle .

Simple Calculator in python tkinter

Example

from tkinter import *
import tkinter
top = tkinter.Tk()


top.geometry('250x250')
top.maxsize(width=250,height=180)
top.minsize(width=250,height=180)
top.title('Calculator')
top.configure(bg='red')

l= Label(top,text='My Calculator',fg='red').grid(row=0,column=1,sticky=W)
l1=Label(top,text='First Number',).grid(row=1,column=0,sticky=W)
l2=Label(top,text='Second Number',).grid(row=2,column=0,sticky=W)
l3=Label(top,text='Opeartor',).grid(row=3,column=0,sticky=W)
l4=Label(top,text='Answer',).grid(row=4,column=0,sticky=W)

E1= Entry(top,bd=5)
E1.grid(row=1,column=1)
E2= Entry(top,bd=5)
E2.grid(row=2,column=1)
E3= Entry(top,bd=5)
E3.grid(row=3,column=1)
E4= Entry(top,bd=5)
E4.grid(row=4,column=1)



def proces():
    number1=Entry.get(E1)
    number2=Entry.get(E2)
    operator=Entry.get(E3)
    number1=int(number1)
    number2=int(number2)
    if operator =="+":
        answer=number1+number2
    if operator =="-":
        answer=number1-number2
    if operator=="*":
        answer=number1*number2
    if operator=="/":
        answer=number1/number2
    Entry.insert(E4,0,answer)
    print(answer)


B=Button(top, text ="Submit",command = proces,bg='yellow').grid(row=5,column=1,)

top.mainloop()

Output

Aap is coding ko use karke aap bhi aapni gui application bana sakte hai .

Gui Calculator in Python tkinter

Also Read This Post :

Dosto mujhe ummed hai ki aap GUI Calculator With Tkinter ko acchi tarah se samanj gye honge agar aap ko ye post acchi lage to mere is website ko jarur follow kre or ha agar aap video bhi dekhna chahte hai to aap mere channel ko bhi subscribe kar sakte hai. channel ka link aapko home page par mil jayega |

Leave a Reply

Your email address will not be published. Required fields are marked *