Write a function called next_prime that takes a scalar positive integer input n. Use a while-loop to
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a function called next_prime that takes a scalar positive integer input n. Use a while-loop to find and return k, the smallest prime number that is greater than n. Feel free to use the built-in isprime function (do not use nextprime).
Related Book For
Elementary Linear Algebra with Applications
ISBN: 978-0471669593
9th edition
Authors: Howard Anton, Chris Rorres
Posted Date: