# q1.py # def Cbrt(x, e=0.0001): p = 0.0 q = x while abs(q - p) > e: print q p = q q = p - (p**3 - x)/(3.*p**2) return q
# q2.py # def gcd(m, n): r = m % n if r == 0: return n else: return gcd(n, r)
This site conforms to the following standards: