Call and Return Help


Oops, try again. Your code looks a bit off. Check the Hint if you need help! Your code threw the following error: square() takes no arguments (1 given)

I don't know what else to do. I have tried indenting, using print, using def, and indenting those as well. There is no other thing I can think of that will make this error go away. If i indent it tells me "did you remember to call the square function of 10?

def square(n):
    """Returns the square of a number."""
    squared = n**2
    print "%d squared is %d." % (n, squared)
    return squared
# Call the square function on line 9! Make sure to
# include the number 10 between the parentheses.


Code looks fine. Try refreshing the page.


I have many times and even exited out of the program completely but it still says the same error. This is not the first time that this has happened where I am putting in the correct input and it still gives me an error.


Hm...try changing browsers. I put your code into my environment and am using Chrome. It passed so I know there's nothing off with your code.


I am using Chrome:( I will reset my computer I guess.


Did you try other browsers (IE or Firefox)?


I removed any other browsers from my laptop but I may have to download Firefox for this to work.


Ah, I see. Try another browser and it that doesn't work...I guess restarting your computer would be the next option. Usually, refreshing the page would solve these.


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