You are on page 1of 2

IT SYSTEM SECURITY LABORATORY

EXPERIMENT NO. 2 (PART 1)

Q1.
import tkinter as tk
from tkinter import Button

win=tk.Tk()
win.title('LOGIN PAGE')
win.geometry('300x300')
title1=tk.Label(win,text='CHAT APPLICATION')
title1.place(x=30,y=1)
lab1=tk.Label(win,text='Enter:')
lab1.place(x=2,y=30)

def checkcreds():
u=entry1.get()
info=tk.Label(win, text=u)
info.place(x=90,y=90)

button1=Button(win,text='Submit',command=checkcreds)
button1.place(x=30,y=55)
entry1=tk.Entry(win)
entry1.place(x=45,y=30)
Q2.
import tkinter as tk
from tkinter import Button

win=tk.Tk()
win.title('CHAT BOT')
win.geometry('300x100')

def meth1():
print('new')

def meth2():
print('open')

button1=Button(win,text='New',command=meth1)
button1.place(x=10,y=10)
button2=Button(win,text='Open',command=meth2)
button2.place(x=60,y=10)

You might also like