Python Python Basics Functions and Looping Create a Function

Its also unclear to me why this wont work

I added 3 as an argument to square and defined the square of 3 as a result and then i ask to print the result

squaring.py
def square(number):
    number = number * number
    return number


square(3) = result
print(result)

1 Answer

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 48,707 Points

You are assigning the result of your function backwards. It should be

result = square(3)