9. Which of the following syntax is true to find the square root of a number?
(a) sqrt(a)
b) Math.sqrt(a) (c) Squareroot(a) (d) None
Answers
Answered by
3
Answer:
option a
Explanation:
The Math.sqrt() function returns the square root of a number
Answered by
0
I will say that all are correct syntax except option d.
Option a will be true if you wrote the following code:
from Math import sqrt
Option b will be true if you wrote the following code:
import Math
Option c will be True if you have written the following code:
import Math
or
from Math import sqrt
def Squareroot(a):
return Math.sqrt(a)
or
sqrt(a)
Another syntax could be:
def sqrt(a):
return a**0.5
Similar questions