Before We Begin: Can't even begin


The object of the exercise is to create an argument that accepts no input, but always returns a single answer.

def answer():
    return answer("42")

Shouldn't this work?


No, it will not work. When you use answer("42") you are passing an argument to answer(). If you want to return a single answer just use return 42. If you wanted to return a string you would need to encapsulate the string in quotes. For example
return "This is a single string"


Very helpful. Thank you.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.