Python Python Basics Functions and Looping Create a Function

I'm a beginner, I can't complete the Challenge Task. I have no idea what I made mistake ;(

Bummer: AssertionError: 25 != 9 : Make sure you store the return value from the function in a variable named result

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

2 Answers

Nils Kriedner
Nils Kriedner
23,089 Points

I think it wants you to store the "number * number" in the variable result (inside the function) and then return the variable.

Nils Kriedner
Nils Kriedner
23,089 Points

Let me know if you don't know what I mean.

Thank you for helping me so promptly! I did it!

Janko Bauer
Janko Bauer
12,070 Points

Hi,

I don't know the details on the question, but it looks like you need to assign the result in the function and then return the result.

And tip: we almost never have to call the function. We just have to provide it. The calling is done in the evaluation, for us. And no printing. I did that and it never passed...

Thank you for your advice!