indentation error when I try to run Quiz
I am getting a weird error when I try to run Quiz. The indentation is fine but it is still giving an error.
from quiz import Quiz
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/treehouse/workspace/quiz.py", line 28
def ask(self, question):
IndentationError: expected an indented block
def take_quiz(self): # log the start time # ask all of the questions # log if they got the question right # log the end time # show a summary def ask(self, question): (!!!!!! line 28) # log the start time # capture the answer # check the answer # log the end time # if the answer's right, send back True # otherwise, send back False # send back the elapsed time, too
Oszkár FehérTreehouse Project Reviewer
Salam Mohammad. If your functions are just what you showed than it will be an error because nothing is passed in the function, the comments are not part of the script, if you write under the:
def ask(args): pass
it will work. I hope this will help you out. Happy coding
Thanks, I apppreciate the help.