Square a Number
Beginner
Let's go on a mathematical adventure! đ Imagine you have a magical number crystal that doubles itself when you look at it. Well, in the math world, when you square a number, it's kind of like that magical crystal that multiplies itself by itself.
Your quest is to write a Python function that takes a number and returns its square. This means multiplying the number by itself. Easy peasy, right? đ
Here is what you need to do:
- Create a function called
square_number. - The function takes one argument, a number.
- It returns the square of that number.
Here's how it works:
square_number(3) # returns 9, because 3 * 3 = 9 square_number(5) # returns 25, because 5 * 5 = 25 square_number(10) # returns 100, because 10 * 10 = 100
Are you ready to show your math powers? Let's crunch some numbers! đ§ź
Inputs
Arg 1:
3Expected Output
9Actual Output