I am not familiar with Python so I am writing the C counter part(too lazy to write pseudo code.. :P) To find the first n prime numbers.. // prints all the primes.. not bothering to make an array and return it etc..
void find_first_n_primes(int n){
int count = 0;
for(int i=2;count<=n;i++){
factFlag == 0; //flag for factor count...
for(int k=2;k<sqrt(n)+1;k++){
if(i%k == 0) // factor found..
factFlag++;
}
if(factFlag==0)// no factors found hence prime..
{
Print(i); // prime displayed..
count++;
}
}
}