Source code for quicktest.functions


[docs]def squared(x): """ Returns the square of the input x Parameters: ----------- x, float: Base number Returns: -------- float: Base number raised to power 2 See Also: ------ pow : raise an argument to an arbitrary power Examples -------- >>> squared(2) 4 >>> squared(8) 64 >>> squared(-1) 1 """ return x*x