In this python basic program, we will find the square root of a number defined by the user.
Steps to solve the program
- Import math library.
- Take a number as input.
- Find the square root of the number using math.sqrt().
- Print the output.
import math
num1 = 9
print(math.sqrt(num1))
Output :
3.0