Following on from [Part 1](http://www.codewars.com/kata/filling-an-array-part-1/), part 2 looks at some more complicated array contents.
So let's try filling an array with...
## ...square numbers
The numbers from `1` to `n*n`
## ...a range of numbers
A range of numbers starting from `start` and increasing by `step`
## ...random numbers
A bunch of random integers between `min` and `max`
## ...prime numbers
All primes starting from `2` (obviously)...
HOTE: All the above functions should take as their first parameter a number that determines the length of the returned array.
import random

def squares(n):
        return [i*i for i in range(1,n+1)]

def num_range(n, start, step):
    return [ i for i in range(start,start+n*step,step) ]

def rand_range(n, mn, mx):
    return [ random.randint(mn, mx) for nvm in range(n) ]

def primes(n):
    if n ==1:
        return [2]
    if n ==2:
        return [2,3]
    c = 2
    ReturnLs = [2,3]
    i = 5
    while c<n:
        if isprime(i):
            ReturnLs.append(i)
            c+=1
        i+=2
    return ReturnLs
def isprime(n):
    if n%2==0:
        return False
    if n%3==0:
        return False
    for i in range(5,int(n**0.5)+1):
        if n%i==0:
            return False
    return True
import random

def squares(n):
        return [i*i for i in range(1,n+1)]

def num_range(n, start, step):
    return [ i for i in range(start,start+n*step,step) ]

def rand_range(n, mn, mx):
    return [ random.randint(mn, mx) for nvm in range(n) ]

def primes(n):
    if n ==1:
        return [2]
    if n ==2:
        return [2,3]
    c = 2
    ReturnLs = [2,3]
    i = 5
    while c<n:
        if isprime(i):
            ReturnLs.append(i)
            c+=1
        i+=2
    return ReturnLs
def isprime(n):
    if n%2==0:
        return False
    if n%3==0:
        return False
    for i in range(5,int(n**0.5)+1):
        if n%i==0:
            return False
    return True