Hello everyone, I am on the second challenge for functions and I think I found an error perhaps. The question wants me to use () to find the square root of the argument (num). However from the previous lessons codecademy only has explained how to use () as a power for an argument ex: num2. Please explain to me how you can find the square root of an argument using ().

Write a function named square_root() that has one parameter named num .
Use exponents ( ** ) to return the square root of num .

Write your square_root function here:

def square_root(num):
result = num**;
return result

Uncomment these function calls to test your square_root function:

Have you learned about functions yet?
The question is asking you to write a function using def that will calculate the square root of the number it is given.

Here is an example of a function that returns the square of a number:

To find any root of a number, one should raise that number to 1/index of the root.
So in case of a square root, the number should be raised to the power of 0.5 (=1/2).
Example:
square root of 9 = 9^0.5 = 3
cubic root of 9 = 9^(1/3) =2,0800838â€¦
root of index 4 of 16 = 9^0.25 = 2

squaring a number is the same as doubling its exponent

x ** 1
x ** 2
x ** 4
x ** 8
x ** 16
x ** 32

what happens in the other direction is that the exponent is halved, so thatâ€™s how you would do square root.
evaluating it is another story, but ** does that so you donâ€™t need to care about that part.

Why would finding the square root of a number be part of 2nd question of the first challenge? The lessons mention absolutely nothing about finding square roots, only finding the square of a number or using exponents.

Iâ€™ve tried

return num ** / 2

return **

return / **

return ** /

It all gets a syntax error. Iâ€™m guessing itâ€™s because finding a square root means I need a bit more knowledge of Python or coding in general. Which brings me back to my original question.

return num ** / 2 is not valid syntax. Neither are any of the examples you described. Each operator should have the correct amount of operands. x / y means â€śdivide x by yâ€ť. x ** y means â€śraise x to the power of yâ€ť.
You cannot remove x nor y in any of those two lines I described, for they will become meaningless.

If you are trying to calculate square roots the way I described it, you should write