HW 12

Programming: you must create two programs based on our last HW with prime numbers: primes.py and nextprime.py

Create a program primes.py that contains the isprime(int) function that we provided you last time. This program must be runnable with simple user input:

python3 primes.py
Prime candidate? 13
YES

python3 primes.py
Prime candidate? 90
NO

Create a second program nextprime.py that contains your HW solution next_prime(int) function from last time (you have to do it now if you didn't do the last HW), but does NOT contain isprime(int). Instead it must import your first primes.py program and use that program's isprime(int) function. You may NOT redefine isprime in any way in this nextprime.py program. Your program must be runnable with this simple user input:

python3 nextprime.py
Number? 13
The next prime is 17

python3 nextprime.py
Number? 200
The next prime is 211

Submit

Submit your primes.py and nextprime.py to the online submission system under hw12-multiprime.
Make sure isprime() is only defined in primes.py.

submit -c=sd211 -p=hw12-multiprime primes.py nextprime.py