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