Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

Why does my output say TypeError: object() takes no parameters .

0 votes
asked Apr 6, 2021 by Albert Wu (120 points)
Im making a multiple choice quiz in python 3. Pls help me. https://onlinegdb.com/SkxibDKru

1 Answer

+1 vote
answered Apr 9, 2021 by Peter Minarik (86,040 points)
edited Apr 9, 2021 by Peter Minarik

I've found the bugs. Green means lines to be added. Red means lines to be removed.

main.py

Wrong indentation. This is not a compilation problem, but it prevents your program to run correctly (to use the right logic).

line 21:        run_test(questions)
line 21:run_test(questions)

Question.py

You misspelt the __init__ function.

line 2:    def __init_(self, prompt, answer):
line 2:    def __init__(self, prompt, answer):

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...