input: Write a function to compute the sum of the first n prime numbers.
  assert sum_primes(5) == 28
  assert sum_primes(10) == 129
  assert sum_primes(3) == 10
output: def sum_primes(n):
      def is_prime(num):
          if num < 2:
              return False
          for i in range(2, int(num**0.5) + 1):
              if num % i == 0:
                  return False
          return True
      
      count, total, num = 0, 0, 2
      while count < n:
          if is_prime(num):
              total += num
              count += 1
          num += 1
      return total