programming-examples/python/Basics/Program to calculate the square root.py
2019-11-18 14:44:36 +01:00

9 lines
278 B
Python

# Python Program to calculate the square root
# Note: change this value for a different result
num = 8
# uncomment to take the input from the user
#num = float(input('Enter a number: '))
num_sqrt = num ** 0.5
print('The square root of %0.3f is %0.3f'%(num ,num_sqrt))