What does this Python code do?
```
import random


def montecarloPi(calcs):
    hits = 0

    for i in range(calcs):
        x = random.random()
        y = random.random()
        if (x**2 + y**2) < 1:
            hits = hits + 1

    return 4.0 * hits / calcs


print(montecarloPi(10000))
```