(Prime Numbers) An integer is said to be prime if it isdivisible by only 1 and itself. For example, 2, 3, 5 and 7 areprime, but 4, 6, 8 and 9 are not. Write pseudocode and functioncalled isPrime that receives an integer and determines whether theinteger is prime or not. Write a test program that uses isPrime todetermine and print all the prime numbers between 1 and 1000.Display 10 numbers per line. Twin primes are a pair of primenumbers that differ by 2. For example, 3 and 5 are twin primes, asare 5 and 7, and 11 and 13. In your test program, use isPrime todetermine and print all twin primes less than 1000. Display theoutput as follows:
(3, 5)
(5, 7)
…