SHARE
TWEET

Untitled

a guest Aug 25th, 2019 94 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from tkinter import *
  2. from tkinter import ttk
  3. root=Tk()
  4. root.title("BMI")
  5.  
  6.  
  7.  
  8. ttk.Label(root,text= "Weight :").grid(row=0,column=0)
  9. Weight=ttk.Entry(root,width=30,font=('Arial',20)).grid(row=0,column=3)
  10.  
  11. ttk.Label(root,text= "Height :").grid(row=1,column=0)
  12. Height=ttk.Entry(root,width=30,font=('Arial',20)).grid(row=1,column=3)
  13.  
  14. buCalculate=ttk.Button(root,command=buCalculate,text="Calculate").grid(row=2,column=3)
  15.  
  16.  
  17. def buCalculate() :
  18.     x = Weight.get()
  19.     y = Height.get()
  20.     buCalculate = x/y**2
  21. if buCalculate > 18:
  22.     print("")
  23.  
  24.  
  25. root.mainloop()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top