Task 15: user_guess = get_user_guess():


Per the hint, the correct code for calling the function is:

user_guess = get_user_guess():

Up to this point in the course, all the function calls I remember performing were via inputting actual parameters or return or print statements.

However, it appears the function is being called by setting it equal to a variable. This one threw me. I'm not sure I follow the logic.

Might I have missed something? Any explanation/context would be much appreciated.

(Note -- I understand that user_guess used here is different from user_guess used in an earlier task.)



Based off what you have, you are getting an error when you put the colon at the end of this piece of code:

user_guess = get_user_guess():

However, it's hard to say for sure. Please post your full code.


This isn't responsive to my question, alas. The code I posted is actually the correct code, I'm just not sure why. Kindly re-read my question if you don't mind.


You have one line of code. Please post the full code.

And when you call the function, don't have the colon at the end.


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