Help with functions


Oops, try again. Did you remember to call square(10) on line 9?

Replace this line with your code. 

def square(n):
    """Returns the square of a number."""
    squared = n**2
    print "%d squared is %d." % (n, squared)
    return squared


HI this line


just remove the space before square(10)



is indented even though it is not part of the function. Remove the indent for that line.


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