Question: ( 8 points ) Given a list of 4 0 0 0 0 random integers, complete the following program which adds all the integers of

(8 points)
Given a list of 40000 random integers, complete the following program which adds all the integers of the list that can be evenly divided by 5(e.9., integers like 10,15,25, etc.) and finally print the summation result. Implement the addition in two different parallel ways: (1) using the concurrent.futures module and 4 threads; (2) using the numpy module.
import eoncurrent.futures
import numpy
random.randint (0.100000) for i in range(40000)}
#I method (1)- using concurrent.futures and 4 thiscads def addition ():
# method (2)- using numpy
( 8 points ) Given a list of 4 0 0 0 0 random

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!