This involves creating a pool of processes using Python's multiprocessing module and distributing the chunks of data across these processes. Each process then calculates the sum of the numbers within its assigned chunk. This parallel processing technique helps to reduce the overall computation time by executing multiple tasks simultaneously.
- Install the required dependencies:
pip install multiprocessing
- Run the script:
python sub_task1.py
- Python 3.10 or higher