0

This class is not working properly plz help

class brain(): def __init__(self,q_list): self.question_number=q_list def next_question(self): current_question=self.question_list[self.question_number] input(f"q{self.question_number}: {current_question.text} (True/False)") op=brain(1) print(op.next_question())

25th Dec 2021, 11:53 AM
shahid momin
shahid momin - avatar
4 Answers
+ 2
* there is no self.question_list * you never passed a question list to the object * current_question would need to have a text property
25th Dec 2021, 3:01 PM
Lisa
Lisa - avatar
+ 2
1. Write your code in code playground, then link it in the question using + button 2. Explain what you want the code to do 3. Describe what went wrong This way, you can get real help
25th Dec 2021, 7:21 PM
Emerson Prado
Emerson Prado - avatar
0
So what do I pass there
25th Dec 2021, 3:04 PM
shahid momin
shahid momin - avatar
0
Ok thanks
26th Dec 2021, 4:59 AM
shahid momin
shahid momin - avatar