Python Python Basics Functions and Looping Create a Function

About the squaring.py

I want to know what is wrong with my coding. Thank you so much.

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

square_result = square(5)
print(square_result)

1 Answer

Ed H-P
Ed H-P
2,557 Points

Your code works fine. Are you saying it doesn't pass the task's acceptance criteria? Or looking for advice on how to improve it?

Yep, it doesn't pass the check. It really confuses me.

Ed H-P
Ed H-P
2,557 Points

Hmm that's odd... could you copy in the lesson question text, and also share the link to the exercise?

Ahhh, I find something wrong. The question asked me to use 3 as a check number, but I used 5 instead... Thanks a lot