-5

How to get Square root of a number without import anything in python? You know we can do this:

import math
a = 4
s = math.sqrt(a)

but i want do this more simple without import any library.

Kasra Najafi
  • 560
  • 5
  • 11

1 Answers1

4

You can do this using Exponentiation in python line this:

a = 4
b = a ** 0.5    #(1/2)
Kasra Najafi
  • 560
  • 5
  • 11