input: Write a function to generate a list of the first 'n' prime numbers.
  assert generate_primes(5) == [2, 3, 5, 7, 11]
  assert generate_primes(1) == [2]
  assert generate_primes(3) == [2, 3, 5]
output: def generate_primes(n):
      if n < 1:
          return []
      
      primes = []
      num = 2
      while len(primes) < n:
          for p in primes:
              if num % p == 0:
                  break
          else:
              primes.append(num)
          num += 1
      
      return primes