Part 1: Create a function that checks if an integer n is a prime (returns true if the integer is prime and false otherwise). In the body of your page create a loop that uses this function to check and display all primes in a range from 1 to 100.
Part 2: Create a function GeneratePassword which accepts two arguments, an integer and a character string consisting of letters (a-z) and digits (0-9).
When GeneratePassword(5,'abc0123') is called, it should return a random string of 5 characters taken from 'abc0123'.
For case: GeneratePassword(7,'abczxc012394') could return any of the subsequent outputs : 2c00acb 2c23z93 030b2a4
In the body of your page generate three different calls to this function using a different numeric value and text string and display the results.
You need to find the prime number and prepare the code in PHP. I'm not sure how to solve the question. Can anyone help me?