Dec-04-2019, 09:36 PM
(Dec-04-2019, 09:08 PM)Spacecowboy Wrote: ##UPDATE##try
@ line 47 changed to : added_value = Rekenmachine
There is now an error
btn[i] ["command"] = lambda x= numberpad[i]: added_value.numberEnter(x) TypeError: numberEnter() missing 1 required positional argument: 'num'
@Clunk_Head the assignment before was a simple calculator without class
btn[i] ["command"] = lambda: added_value.numberEnter(numberpad[i])but if you don't need a class in the program then you can simplify your code quite a bit by removing it, turning the instance variables into global variables, and defining the functions independent of a class.