import tkinter as tk
window = tk.Tk()
window.geometry("600x400")
window.title("intercode")
new_label=tk.Label(window,text='Enter your height in feet
')
new_label.pack()
entry_label=tk.Entry(window)
entry_label.pack()
results= tk.StringVar(window)
result_lable=tk.Label(window,textvariable=results)
result_lable.pack()
def callbackfunct():
height = entry_label.get()
try:
height= float(height)
except ValueError:
results.set("
Please Enter Number.")
converted_height=0.0606061*float(height)
converted_height=round(converted_height,3)
results.set(f"
You are converted height |{converted_height}| tall.")
print(f"inputs .*>|{converted_height}|<*. ")
entry_label.delete(0,tk.END)
buttonez = tk.Button(text="Submit", command=callbackfunct)
buttonez.pack()
window.mainloop()