我一直试图转换一个条目而且一直在说
TypeError: int() argument must be a string or a number, not 'Entry'
以下是我的计划的一部分:
self.answers = Entry(self)
self.answers.grid(row = 5, column = 3, sticky = W)
def update_text(self):
answers = self.answers
answer = int(answers)
if self.answer > the_number:
answer =("Lower...")
else:
answer =("Higher...")
tries += 1
我试过了 value = answers.get() 现在说它
NameError: global name 'answers' is not defined