(d) Write a function named Unifarmlnterval which has arguments intervalSize, with de fault value 0.05, and maxIter, the maximum number of iterations to perform, with default value 1000. The function should repeatedly call UnifarmMean with a sampleSize of 1, until either the mean of all the samples obtained is within intervalSize of 0.5 or maxlter iter ations have been completed. If it stops before the maximum number of iterations has been completed, it should display, with appropriate text, the number of times UnifarmMean has been called, and return this number. If it stops because the maximum number of iterations has been completed, it should display a message to this effect and returnmaxlter. |