<prompt> Design an algorithm to determine whether a given number is prime.  <response>: A prime number is a natural number that is greater than 1 and is not divisible by any other number except for 1 and itself. Below is an algorithm to determine whether a given number is prime:Step 1: Take the input number, n from the user.Step 2: Initialize a variable isPrime to True.Step 3: If n is less than or equal to 1, assign False to the isPrime. and skip to step 9.Step 4: For each number i starting from 2 to the square root of n do the following:Step 5: Check whether n is divisible by i.Step 6: If n is divisible by i, then assign False to isPrime.Step 7: Break the loop.Step 8: End of for loop.Step 9: If the value of isPrime is True then display n is a prime number, else display the message n is not a prime number.Step 10: End. 