Created
November 11, 2018 11:52
-
-
Save Anshaadi/023d726fb2dfe4a604616ed27249f4b6 to your computer and use it in GitHub Desktop.
python program with GUI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tkinter import * | |
window =Tk() | |
window.title("Uppercase-Lowercase") | |
frame=Frame(window) | |
entry=Entry(frame) | |
def upperc(): | |
upp=entry.get() | |
entry.delete(0,END) | |
entry.insert(0,upp.upper()) | |
def lowerc(): | |
low=entry.get() | |
entry.delete(0,END) | |
entry.insert(0,low.lower()) | |
but1=Button(frame,text="UPPERCASE" ,command=upperc) | |
but2=Button(frame,text="lowercase",command=lowerc) | |
but1.pack(side="top") | |
entry.pack(side="top") | |
but2.pack(side="bottom") | |
frame.pack() | |
window.mainloop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment