This repository demonstrates how to use the numpy.random
module to generate random numbers and work with different probability distributions in Python.
- Generate random integers and floating-point numbers
- Create random arrays and matrices
- Use normal, binomial, and Poisson distributions
- Shuffle arrays and select random samples
-
Clone this repository:
git clone https://github.com/your-username/numpy-random-practice.git cd numpy-random-practice
-
(Optional) Create and activate a virtual environment:
python -m venv venv # Windows venv\Scripts\activate # macOS/Linux source venv/bin/activate
-
Install the dependencies:
pip install -r requirements.txt
Run any Python file to see the examples in action:
python random_basic.py
python random_distribution.py
python random_exercises.py
Feel free to modify the code to explore more random number features.
- Python 3.x
- NumPy
Created by Usama Israr Khan
Happy coding! 🚀