Question: ( 7 points ) ( a ) the following program creates a list of 4 0 0 0 integers and then increases each number by

(7 points)
(a) the following program creates a list of 4000 integers and then increases each number by 10 parallelly by using 4 threads. However, there is one error in using the threads. Please point it out and fix it.(b) what is the difference between the execution of the following two programs? Please explain the reasons. After that, please fix the problems of line 9 and line 10 of the 1 st program so that the two programs have no running difference (Note: no credits if change the 1 st program exactly same as the 2 nd)import concurrent,futuresdef thread (num, t): print("Thread %s started" %num) time.sleep(t)with concurrent.futures. ThreadPoolExecutor() as t: t.map(thread,(1,2),(3,6))
2
( 7 points ) ( a ) the following program creates

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!