def check_answer(self, currentscore):
self.user_entry = self.user_entry.get_text()
if self.user_entry == self.books:
self.current += 1
self.total += 1
self.currentscore = self.current
print "right"
else:
print "wrong"
print self.currentscore
print self.total
나는 그것을 실행할 때 두 번째 텍스트를 넣습니다. File "C:\Python27\guessing.py", line 16, in check_answer self.user_entry = self.user_entry.get_text() AttributeError: 'str' object has no attribute 'get_text'
누군가 나에게 설명해 주시겠습니까? 왜 그것이 단지 한 번 작동하는지 나에게 왜. 또한 프로그램이 if 문을 실행하지 않는 이유는 무엇입니까? 그것은 단지 잘못 말합니다.한 번만 작동하는 프로그램을 수정하는 방법?
self.books = 'hello'