Write a short program that determines whether a number N is a prime number.
Remember, a prime number is a natural number greater than 1 that is only divisible with zero remainder by the number 1, and itself. The first few prime numbers are 2,3,5,7,11,13,17,19,23,29, …
For now you don’t have to implement a fancy algorithm for testing primeness (e.g. Sieve of Eratosthenes). For now, it’s ok to implement a simple, brute force method.
Do not use a function you find on the internet or a built-in function (such as in SymPy) to test primeness. The purpose of this exercise is for you to write your own code.
You can however use the isprime function in Sympy as a check to make sure your own code works:
from sympy.ntheory import isprimeprint(f"the number 11 is prime: {isprime(11)}")print(f"the number 12 is prime: {isprime(12)}")print(f"the number 13 is prime: {isprime(13)}")
the number 11 is prime: True
the number 12 is prime: False
the number 13 is prime: True
Hint: you will probably want to use the modulo operator (which is the symbol % in Python) to test whether the remainder is zero after dividing a number N by another number m.