from tkinter import *

def click():
    name = textbox1.get()
    message = str('Hello ' + name)
    textbox2['bg'] ="yellow"
    textbox2['fg'] = "blue"
    textbox2['text'] = message

def calculate():
    calculation = int(textbox1.get()) * 5
    #calculation = str('Hello ' + name)
    textbox3['bg'] ="yellow"
    textbox3['fg'] = "blue"
    textbox3['text'] = calculation

window = Tk()
window.geometry("500x200")

label1 = Label(text = "Enter your name: ")
label1.place(x=30, y=20)

textbox1 = Entry(text = "")
textbox1.place(x=150, y=20, width = 200, height = 25)
textbox1["justify"] =["center"]
textbox1.focus()

button1 = Button(text = "Press me", command = click)
button1.place(x=30, y=50, width=120, height =25)

textbox2 = Message(text = "")
textbox2.place(x=150, y=80, width = 200, height = 25)
textbox2["justify"] =["center"]
textbox2.focus()


button2 = Button(text = "Calculate", command = calculate)
button2.place(x=30, y=80, width=120, height =25)


textbox2=Message(text="")
textbox2.place(x=150, y=50, width=200, height=25)
textbox2["bg"]="white"
textbox2["fg"]="black"

textbox3=Message(text="")
textbox3.place(x=150, y=80, width=200, height=25)
textbox3["bg"]="white"
textbox3["fg"]="black"


window.mainloop()
from tkinter import *

def click():
    name = textbox1.get()
    message = str('Hello ' + name)
    textbox2['bg'] ="yellow"
    textbox2['fg'] = "blue"
    textbox2['text'] = message

def calculate():
    calculation = int(textbox1.get()) * 5
    #calculation = str('Hello ' + name)
    textbox3['bg'] ="yellow"
    textbox3['fg'] = "blue"
    textbox3['text'] = calculation

window = Tk()
window.geometry("500x200")

label1 = Label(text = "Enter your name: ")
label1.place(x=30, y=20)

textbox1 = Entry(text = "")
textbox1.place(x=150, y=20, width = 200, height = 25)
textbox1["justify"] =["center"]
textbox1.focus()

button1 = Button(text = "Press me", command = click)
button1.place(x=30, y=50, width=120, height =25)

textbox2 = Message(text = "")
textbox2.place(x=150, y=80, width = 200, height = 25)
textbox2["justify"] =["center"]
textbox2.focus()


button2 = Button(text = "Calculate", command = calculate)
button2.place(x=30, y=80, width=120, height =25)


textbox2=Message(text="")
textbox2.place(x=150, y=50, width=200, height=25)
textbox2["bg"]="white"
textbox2["fg"]="black"

textbox3=Message(text="")
textbox3.place(x=150, y=80, width=200, height=25)
textbox3["bg"]="white"
textbox3["fg"]="black"


window.mainloop()
#calculation = str('Hello ' + name)