Kim Raffield276 Points
Understanding what it means to create a function that defines a single parameter
I've been re-watching the associated video just before this exercise, but I am not understanding how to create a function named square and assign it a single parameter named number.
In comparing it to the code from the previous exercise, I think my misunderstanding is not being able to translate what I did previously to this new exercise.
Any guidance on how to execute and fully understand this exercise is much appreciated.
def square(number) number = 5 * 5 return square
- First, define the function heading. You got it right: it's
def square(number). Just don't forget to put a colon after the closing parenthesis
- The body is incorrect. The lines must be properly indented, and it should look like the following:
return number * number