Find square root of a number using sqrt() function

Hello everyone, Welcome back! Here we discuss a very simple python program which finds the square root of a given number using a module called Math and use one of its method sqrt().

In the previous post we discussed about finding square root using exponential operation.

You can watch the video on youtube here.

Program on Github

SquareRoot – Code Visualization

Task :

To find square root of a given number.

Approach :

  • Read input number for which the square root is to be calculated using input()orraw_input().
  • Pass that number to sqrt method from Math module sqrt(num).
  • sqrt method will return the square root of the number passed.
  • Print the result.

Program :

Output :

Square root of a number - programminginpython.com
Square root of a number – programminginpython.com
Square root of a number - programminginpython.com
Square root of a number – programminginpython.com

Program on Github

One Comment

  1. Pingback: Python Programming -Square root of a number using exponential operation

Leave a Reply