I need help with making my calculator

Steve D'Aprano steve+python at pearwood.info
Sat May 20 09:56:17 EDT 2017


On Sat, 20 May 2017 11:42 am, garsink at gmail.com wrote:

> m using Python 3.4.2
> This is my code:

Please read this first:

http://sscce.org/

And then indent the "calc" method so that it is part of the class:

> def calc(self, display):
>     try:
>         display.set(eval(display.get()))
>     except:
>         display.set("Type an actual equation please!")

That's not indented. It needs to be indented by one level.




-- 
Steve
Emoji: a small, fuzzy, indistinct picture used to replace a clear and
perfectly comprehensible word.




More information about the Python-list mailing list