Creating our own functions

Screen Link:
https://app.dataquest.io/m/315/functions%3A-fundamentals/3/creating-our-own-functions

My Code:
Functions: Fundamentals = tags:315-3

Replace this line with your code
def square(a_number):
squared_number = a_number * a_number
return squared_number

square_10 = square(a_number=10)
square_16 = square(a_number=16)

What I expected to happen:
I actually thought the code was correct, however, when I submitted my answer it turns to be wrong. I can’t really figure where I went wrong.

What actually happened:
squared_10 isn’t defined in your code, but we expected it to be int type
squared_16 isn’t defined in your code, but we expected it to be int type

Replace this line with the output/error
Output
100
256
Variables
squared_16
squared_10
square_16
square_10

<!--Enter other details below: -->
Help me under how exactly I am supposed to define the code or rather have a better understanding on what exactly is missing.

Hi! Your code for function is actually correct. It seems that the problem is in the variables’ names. As per task you are supposed to give them the following names: squared_10 and squared_16. And you have got square_10 and square_16 instead.

Hi too, it actually worked. Thanks a lot. :grinning:

You are welcome! Could you mark my message as a solution then? Thank you!