day1/exercise/x.py
author Prabhu Ramachandran <prabhu@aero.iitb.ac.in>
Mon, 21 Jun 2010 03:40:59 -0400
branchscipy2010
changeset 417 caec361e3a86
parent 355 6af6441034f9
permissions -rw-r--r--
ENH: Added slides for FFT and basic signal processing, wherein we introduce some random number generation also. Misc. cleanup for tutorial.

d1 = [2,4,6,8]
d0 = [0,2,4,6,8]
dq = [0, 4, 6]

for a in d1:
    th = a * 1000
    for b in d0:
        hu = b * 100
        for c in d0:
            te = c * 10
            for u in dq:
                n = th + hu + te + u
                if is_square(n): print n


for i in range(46, 94, 2):
    n = i * i
    if all_even( n ): print n