Create an algorithm to check if a number is prime or not.
A prime number is any whole number greater than 1 that is divisible only by itself and 1. Let's call the given input `n`.

Here is one possible algorithm to check if `n` is prime or not:

```python
def is_prime(n):
    # Checking if n is less than or equal to 1
    if n <= 1:
        return False
    # Checking if n is equal to 2
    if n == 2:
        return True
        
    # Checking if n is an even number greater than 2
    if n > 2 and n % 2 == 0:
        return False

    # Checking for divisibility with odd numbers from 3 to the square root of n
    for i in range(3, int(n ** 0.5) + 1, 2):
        if n % i == 0:
            return False
    return True
    
```

Using the above function, we can check if an input number is prime or not.

``` python
n = 7
print(is_prime(n)) # True
```
7
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.

### Instruction:
Create an algorithm to check if a number is prime or not.

### Input:
7

### Response:
A prime number is any whole number greater than 1 that is divisible only by itself and 1. Let's call the given input `n`.

Here is one possible algorithm to check if `n` is prime or not:

```python
def is_prime(n):
    # Checking if n is less than or equal to 1
    if n <= 1:
        return False
    # Checking if n is equal to 2
    if n == 2:
        return True
        
    # Checking if n is an even number greater than 2
    if n > 2 and n % 2 == 0:
        return False

    # Checking for divisibility with odd numbers from 3 to the square root of n
    for i in range(3, int(n ** 0.5) + 1, 2):
        if n % i == 0:
            return False
    return True
    
```

Using the above function, we can check if an input number is prime or not.

``` python
n = 7
print(is_prime(n)) # True
```