python use math 1

python use math

import math

print(math.sqrt(4))

Here is what the above code is Doing:
1. We import the math module.
2. We call the sqrt function from the math module.
3. We pass the number 4 as an argument to the sqrt function.
4. The sqrt function returns the square root of 4, which is 2.
5. The print function displays the result: 2.0.

Similar Posts