Python Online Compiler
Example: Python program to calculate the square root of a number using the pow() function
C
C++
C#
Java
Python
PHP
main.py
STDIN
Run
# Python program to calculate the square root of a number using the pow() function print("Enter any number to find the square root::") n, r = float(input()), None # n = number # r = root # Calculate square root of number r = pow(n, 0.5) # Output print("Square root of ", n, " = ", r)
25
Output
Clear
ADVERTISEMENTS