# FirstPrimes.py
# Print first dozen or so prime integers
# Run this using:
#	python FirstPrimes.py

# This is how Python loads software packages
import math

# We can define functions
def isEven(n):
    return n%2 == 0
#  ^ Python is fussy: Each indentation is *four spaces*.
# Nested statements require indentation.
# Two indentations would be *eight spaces* and so on.

def isPrime(n):
    sqrtn = math.sqrt(n)
    if n == 2:
        return True
    if isEven(n):
        return False
    m = 3
    while n%m != 0 and m <= sqrtn:
        m += 2
    return m > sqrtn

# Here, we finally get down to work and calculate the list of primes
for i in range(1,100):
	if isPrime(i):
		print i
