In this example, we will learn how to generate a random integer from 0 to the designated value in Python NumPy.

### Source Code

```
from numpy import random
# generate a random integer from 0 to 50
n = random.randint(50)
print(n)
```

Output:

```
34
```

In this example, we will learn how to generate a random integer from 0 to the designated value in Python NumPy.

```
from numpy import random
# generate a random integer from 0 to 50
n = random.randint(50)
print(n)
```

Output:

```
34
```

Subscribe

0 Comments

Advertisement