In tkinter, a simple calculation function continues to show incorrect answers.

Asked 2 weeks ago, Updated 2 weeks ago, 1 views

I made the code like above, but if you run it and enter the answer,

Even if you type the answer like in the picture, it says it's wrong. I don't know what's wrong. Can I know what's wrong?


2022-09-20 15:00

1 Answers

When you ask a question, please refrain from uploading it as a picture file for the test of the respondents.

You must call the function because the get of the Entry class is a function other than __str__.

And the result value is str, so you have to convert it to int.

2022-09-20 15:00

If you have any answers or tips

© 2022 pinfo. All rights reserved.