Python Python Basics Functions and Looping Create a Function

SINDISO BRIGHT MAPETESE
SINDISO BRIGHT MAPETESE
12,985 Points

how to create a function and square it

squaring.py
def raise_to_power(value1, value1)

1 Answer

first you have to name the function "square", as required by the challenge.... to get a square, we multiply parameter number by itself like eg: The square of 5 is 25. 25 = 5 x 5

def square(number):
    return number*number