![example picture for sqrt()](/images/reference/Sketch_sqrt_0.png)

```python
def setup():
py5.no_stroke()
a = py5.sqrt(6561) # Sets 'a' to 81
b = py5.sqrt(625) # Sets 'b' to 25
c = py5.sqrt(1) # Sets 'c' to 1
py5.rect(0, 25, a, 10)
py5.rect(0, 45, b, 10)
py5.rect(0, 65, c, 10)
```

![example picture for sqrt()](/images/reference/Sketch_sqrt_1.png)

```python
def setup():
py5.no_stroke()
a = py5.sqrt(6561) # Sets 'a' to 81
b = py5.sqrt(-625) # Sets 'b' to the complex number (0+25j)
if isinstance(a, complex):
py5.fill(255, 0, 0)
py5.rect(0, 25, a.imag, 10)
else:
py5.fill(255)
py5.rect(0, 25, a, 10)
if isinstance(b, complex):
py5.fill(255, 0, 0)
py5.rect(0, 45, b.imag, 10)
else:
py5.fill(255)
py5.rect(0, 45, b, 10)
```