title: Trouble With Python Calculator
body: <p>I would like to make a maths app for primary school children (children aged 4-11) and I've started by making a calculator. I'm following a YouTube video but it's showing an error. I'm coding in python 3.4.3 by the way.</p>
  
  <p>This is my code:</p>
  
  <pre><code>from tkinter import*
  
  def iCalc(source, side):
      storeObj = Frame(source, borderwidth=4, bd=4,bg="pink")
      storeObj.pack(side=side, expand=YES, fill=BOTH)
      return storeObj
  
  def button (source, side, text, command=None):
      storeObj = Button(source, text=text, command=command)
      storeObj.pack(side=side, expand=YES, fill=BOTH)
      return storeObj
  
  class app(Frame):
      def __init__(self):
          Frame.__init__(self)
          self.option_add('*Font', 'arial 20 bold')
          self.pack(expand=YES, fill=BOTH)
          self.master.title('Calculator')
  
  
          display = StringVar()
          Entry(self, relief=RIDGE,
                  textvariable=display,justify='right' ,bd=30,bg="pink").pack(side=TOP, expand=YES,
                                                                              fill=BOTH)
          for clearBut in (["CE"],["C"]):
              erase = iCalc(self, TOP)
              for ichar in clearBut:
                  button(erase, LEFT, ichar,
                         lambda storeObj=display, q=ichar: storeObj.set(''))
  
          for NumBut in ("789 /" , "456*" , "123-", "0.+"):
              FunctionNum = iCalc(self, TOP)
              for iEquals in NumBut:
                  button(FunctionNum, LEFT, iEquals,
                          lambda storeObj=display, q=iEquals: storeObj.set(storeObj.get() + q))
  
          EqualsButton = iCalc(self, TOP)
          for iEquals in "=":
              if iEquals == '=':
                  btniEquals = button(EqualsButton, LEFT, iEquals)
                  btniEquals.bind('&lt;ButtonRelease-1&gt;',
                                  lambda e, s=self, storeObj=display: s.calc(storeObj), '+')
              else:
                  btniEquals = button(EqualsButton, LEFT, iEquals,
                      lambda storeObj=display, s=' %s '%iEquals: storeObj.set(storeObj.get()+s))
  
  
              def calc(self, display):
                  try:
                      display.set(eval(display.get()))
                  except:
                      display.set("ERROR")
  
  
  
  if __name__ == '__main__':
      app().mainloop()
  </code></pre>
  
  <p>And this is the error which keeps showing up:</p>
  
  <pre><code>Exception in Tkinter callback
  Traceback (most recent call last):
    File "C:\Python34\lib\tkinter\__init__.py", line 1533, in __call__
      return self.func(*args)
    File "C:\Users\sony\Documents\Raeesa Calc.py", line 42, in &lt;lambda&gt;
      lambda e, s=self, storeObj=display: s.calc(storeObj), '+')
  AttributeError: 'app' object has no attribute 'calc'
  </code></pre>
  
  <p>What do those errors mean?</p>