Jovian
⭐️
Sign In
In [74]:
from tkinter import *
window = Tk()
window.title("Oxford workshop")
window.geometry('250x200')
lbl = Label(window, text="Enter username")
lbl.grid(column=0, row=1)
input1 = Entry(window, width=20)
input1.grid(column=0,row=2)

lb2 = Label(window, text="Enter password")
lb2.grid(column=0, row=3)
input2 = Entry(window, width=20, show="*")
input2.grid(column=0,row=4)

lb3 = Label(window, text="")
lb3.grid(column=0, row=6)

def checkLogin():
    username = input1.get()
    password = input2.get()
    if username == "akash" and password=="akash":
        lb3.configure(text="Login Successful")
    else:
        lb3.configure(text="Login Unsuccessful")

btn = Button(window, text="Login", command=checkLogin, padx=100, background="Yellow")
btn.grid(column=0, row=5)
window.mainloop()