Currency Converter Code Python Tkinter Gui

 




Window Creation


from tkinter import *

root = Tk()

root.geometry("320x300")

root.title("currency converter")

i= PhotoImage(file='')

root.iconphoto(False,i)

root['bg'] ='#f09942'


Widgets Using Entry Button & Label


lab = Label(root,text="Currency Converter",relief="raised",borderwidth=2,font= ('Garamond',25),bg='#f09942',padx=20,pady=10)

lab.pack(padx=10,pady=10)

lab_1 =Label(root,text="USD",font= ('Garamond',25),bg='#f09942')

lab_1.pack(padx=2,pady=2)


en = Entry(root,highlightthickness=1, width=30)

en.pack(padx=2,pady=2)

bt = Button(root,text="TO",command=convert,width=10)

bt.pack(padx=2,pady=2)

lab_2=Label(root,text="INR",font= ('Garamond',25),bg='#f09942')

lab_2.pack(padx=2,pady=2)

en_1=Entry(root,highlightthickness=1, width=30)

en_1.pack(padx=2,pady=2)




Button Code (Conversion Method)  [Button,command= convert]


def convert():

    en_1.delete(0, END)


    value = int(en.get())

    value_1 = value * 81.41

    en_1.insert(0,str(value_1))


root.mainloop()

# End Program


Registration Form Python Tkinter GUI Project






Comments

Popular posts from this blog

Django Class Based Views Blog App

Insert And Retrieve Images From SQlite Database using Tkinter and Python