Menu

(Solved) : Part 1 50 Points Prime Numbers Design Algorithm Determining Number Prime Number Present Ps Q35924671 . . .

please do part 1
Part 1. (50 points) Prime Numbers Design an algorithm for determining if a number is a prime number, and present that in: a)Part 1. (50 points) Prime Numbers Design an algorithm for determining if a number is a prime number, and present that in: a) pseudocode; and b) a flowchart. Write the corresponding code in Python. Present screen shots of the results in which you test that code with 2 numbers that are not prime and 2 numbers that are prime. Embed that code in a loop to print out all the prime numbers between 1 and 200 (present a screen shot of the result and the Python code which generated it – include a few comments to make it more readable). Part 2. (50 points) Riemann zeta function Write the code in Python to evaluate the Riemann zeta function (of some input value called s) from its infinite series form truncated to some upper limit called M (as discussed in class). Test the convergence of your calculation to known value at s-2 for various M. What is the smallest value of M for which the truncated sum gives the right answer within 1% Write the code in Python to evaluate the Riemann zeta fiunction (of some input value called s) from its infinite product form truncated to some upper limit called P (as discussed in class). Note that the product form is over the prime numbers-so you will need to use some of the code you wrote in part 1 to do this. Test the convergence of your calculation to known value at s-2 for various P. What is the smallest value of P for which the truncated product gives the right answer within 1%? Again present screen shots of the Python code you wrote to do these calculations. Show transcribed image text

Expert Answer


Answer to Part 1 50 Points Prime Numbers Design Algorithm Determining Number Prime Number Present Ps Q35924671 . . .

OR