Question: 5 . Bonus Credit Function: Write a Python function called PrimeBonus with one input for the filename to write output data. This function should use
Bonus Credit Function: Write a Python function called "PrimeBonus" with one input for the filename to write output data. This function should use the output from the prime function Problem The function loops through all values of n from to and calculates the value of mathrmntext th prime pn Your function needs to truncate the value of this difference to one decimal place. To the output filename, the function should write the value of n in the first column and the truncated difference or error in the second column. The first line in the output file should have column headings of n and "Error". The bonus credit function will be graded more harshly than the other functions in this homework. If this function does work you will get zero bonus points.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
