title: How do I put "calculating abilities" into TKinter entrys?
body: <p>So I more or less scrapped my old diabetes calculator to make this new one with a GUI. But now my lack of knowledge strikes again...</p>
  
  <p>Could anyone help me how to create a calculator with TKinter entries?</p>
  
  <p>New code:</p>
  
  <pre><code>from tkinter import *
  root = Tk()
  
  root.wm_title("DiabetesC")
  
  label_1 =Label(root, text='Kolhydrater')
  label_2 =Label(root, text='Insulin igår?')
  label_3 =Label(root, text='Regel, 330/500?')
  
  label_version =Label(root, text='DiabetesC v.0.0.1 made by Pantburken')
  
  entry_1 = Entry(root)
  entry_2 = Entry(root)
  entry_3 = Entry(root)
  
  button_1 = Button(root, text='Räkna ut!')
  
  label_version.grid(row=0, column=1)
  
  label_1.grid(row=1, sticky=E)
  label_2.grid(row=2, sticky=E)
  label_3.grid(row=3, sticky=E)
  
  entry_1.grid(row=1, column=1)
  entry_2.grid(row=2, column=1)
  entry_3.grid(row=3, column=1)
  
  button_1.grid(row=4, sticky=E)
  root.mainloop()
  </code></pre>
  
  <p>Old code:</p>
  
  <pre><code>kolhydrater = int(input('Hur många gram kolhydrater är det i livsmedlet? ')
  insulin = int(input('Hur många enheter insulin tog du igår? ')
  regeln = int(input('300/500/100 regeln? ')
  noname = int(regeln / insulin)
  enheter = int(kolhydrater / noname)
  print (enheter)
  </code></pre>
  
  <p>So the main idea is to put the functionality of the old code into the new code with GUI if you understand what I mean?</p>
  
  <p>Thanks for answers!</p>