0

I have ensured the button names do not resemble any function yet this error still shows when i try to use trigonometric or any log/other functions imported from math. I am building a scientific calculator, and while i am successfully able to add/subt/mult/div and use brackets and decimal points, calling math functions like sin cos tan shows me TypeError: 'Button' object is not callable

user95434
  • 19
  • 2
  • 2
    Change `b=operator.widget()` to `b=operator.widget`. – acw1668 Aug 19 '21 at 06:08
  • one more doubt though, when i try to use pi/e it shows could not convert string to float: ' ' Snippet of that part i've added in main Q – user95434 Aug 19 '21 at 06:29
  • `no=float(no)` expects `no` to be a string of valid float number. So check whether `no` is an empty string or not, if it is an empty string, don't call `no=float(no)`. – acw1668 Aug 19 '21 at 06:41

0 Answers0