user
Create a function that displays all the prime numbers from 1 to n.
n = 10


assistant
def find_prime_numbers(n):
    primes = []
    
    for i in range(2, n + 1):
        is_prime = True
        for j in range(2, i):
            if i % j == 0:
                is_prime = False
                break
        if is_prime:
            primes.append(i)
    
    return primes