# random & math — Python Fundamentals: From Basics to Async

Source: https://www.skillbyai.com/en/python/py-random-math

> Generate random values with the random module and use the math module for roots, trigonometry and constants.

## random & math

`random` picks, shuffles, and samples; `math` covers square roots, trig, constants and more than the built-in operators can.

```python
import random, math

print(random.randint(1, 6))       # a dice roll
print(random.choice(["a", "b", "c"]))
print(math.sqrt(2))
print(math.pi)
```
