I have successfully created a GUI that takes user input and gives the desired output, but I can't seem to figure out how to display this output in another window instead of just in the IDE console. My goal is to have a window pop up with the output once the user clicks 'Compute BMI', but as of right now, the output only shows in the console. I have looked for solutions but I can't seem to figure out what tools I can use to make this happen. I am new to GUIs so any help would be much appreciated.
from tkinter import *
root = Tk()
def myBMI():
weight = float(Entry.get(weight_field))
height = float(Entry.get(height_field))
bmi = (weight*703)/(height*height)
print(bmi)
height_label = Label(root, text="Enter your height: ")
height_field = Entry(root)
height_field.grid(row=0, column=1)
height_label.grid(row=0, sticky=E)
weight_label = Label(root, text="Enter your weight: ")
weight_field = Entry(root)
weight_field.grid(row=1, column=1)
weight_label.grid(row=1, sticky=E)
compute_bmi = Button(root, text="Compute BMI", command=myBMI)
compute_bmi.grid(row=2)
root.mainloop()
Toplevelwidget?