osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

I need help with making my calculator


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.