input: Write a function to find all prime numbers up to a given number.
  assert find_all_primes(10) == [2, 3, 5, 7]
  assert find_all_primes(20) == [2, 3, 5, 7, 11, 13, 17, 19]
  assert find_all_primes(30) == [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]
output: def find_all_primes(n):
      def is_prime(x):
          if x <= 1:
              return False
          for i in range(2, int(x**0.5) + 1):
              if x % i == 0:
                  return False
          return True
      
      primes = []
      for number in range(2, n+1):
          if is_prime(number):
              primes.append(number)
      return primes