title: GUI Unit Conversion Meters/Feet
body: <p>I have been working on the Tkinter module for a few weeks now and started writing a GUI. I have a problem when I press the calculate button it doesn't show anything. The goal for it is to show the conversion of 25 meters into feet when the user selects meters or when the user selects feet to convert to meters. I want it to work like in this video right here. Any help would be appreciated. <a href="https://youtu.be/1z41yet2DkI" rel="nofollow noreferrer">https://youtu.be/1z41yet2DkI</a></p>
  <pre><code>from tkinter import *
  from tkinter import ttk
  
  root = Tk()
  root.title(&quot;Length Converter&quot;)
  
  def calculate(*args):
  # Conversion of meters
     if choices == &quot;meters&quot;:
         value = float(meters.get())
         feet.set(int(3.281 * value * 10000.0 + 0.5)/10000.0)
  # Conversion of feet
     if choices == &quot;feet&quot;:
         value = float(feet.get())
         meters.set(int(0.3048 * value * 10000.0 + 0.5) / 10000.0)
  
  mainframe = ttk.Frame(root, padding= &quot;25 25 25 25&quot;)
  mainframe.grid(column=0, row=0, sticky=(N, W, E, S))
  root.columnconfigure(0, weight=1)
  root.rowconfigure(0, weight=1)
  
  meters = StringVar()
  feet = StringVar()
  n = StringVar()
  
  input_entry = ttk.Entry(mainframe, width=7, textvariable=meters)
  input_entry.grid(column=2, row=1, sticky=(W, E))
  
  choices = ttk.Combobox (root, width = 10, textvariable = n)
  choices ['values'] = ('meters', 'feet')
  choices.grid(column = 1, row = 1)
  
  
  ttk.Label(mainframe, text=&quot;is equal to&quot;).grid(column=1, row=2, sticky=E)
  ttk.Button(mainframe, text=&quot;Calculate&quot;, command=calculate).grid(column=2, row=3, sticky=W)
  
  
  for child in mainframe.winfo_children():
      child.grid_configure(padx=5, pady=5)
  root.mainloop()
  </code></pre>