信不信改成
print(self.question)
就正確了?
你在類內引用變量,一樣要加self
補全一下(拜託.....以後貼問題,用原始碼好嗎?不要用圖片,我們還要重打)
    def show_question(self):
        *** show the survey question ***
        print(self.question)
怎麼標榜一天可以學起來的python,被你學的2266的......
恩恩, 要貼原始碼,
才方便幫忙測試,
否則基本上大部分人會直接跳過.
def show_question(self):
    print(question)
你這裡的question是從哪裡來的 你沒有定義啊
應該是這樣吧
code
class Question():
    def __init__(self, question):
        self.question = question
        self.responses = []
    def show_question(self):
        print(self.question)
可以以後改貼 code 別貼圖嗎
很累