prime( )prime( prime(- here is the module in actionthe /operator allows it to work for floating-point numbers tooeven though it perhaps should notpython primes py is prime is prime has factor has factor is prime is prime not prime - not prime this function still isn' very reusable--it could return valuesinstead of printing --but it' enough to run experiments it' also not strict mathematical prime (floating points work)and it' still inefficient improvements are left as exercises for more mathematically minded readers (hinta for loop over range( - may be bit quicker than the whilebut the algorithm is the real bottleneck here to time alternativesuse the homegrown timer or standard library timeit modules and coding patterns like those used in ' timing sections (and see solution iterations and comprehensions here is the sort of code you should writei may have preferencebut yours may varyvalues [ import math res [for in valuesres append(math sqrt( )res [ list(map(math sqrtvalues)[ [math sqrt(xfor in values[ list(math sqrt(xfor in values[ timing tools here is some code wrote to time the three square root optionsalong with the results in cpythons and and pypy (which implements python each test takes the best of three runseach run takes the total time required to call the test function , timesand each test function iterates , times the last result of each function is printed to verify that all three do the same workfile timer py ( and xsame as listed in appendix dsolutions to end-of-part exercises