Commit 46eb33ea authored by Taddeus Kroes's avatar Taddeus Kroes

Code cleanup

parent 84cf9d61
...@@ -3,9 +3,9 @@ def tri(n): return n * (n + 1) / 2 ...@@ -3,9 +3,9 @@ def tri(n): return n * (n + 1) / 2
def pent(n): return n * (3 * n - 1) / 2 def pent(n): return n * (3 * n - 1) / 2
def hexa(n): return n * (2 * n - 1) def hexa(n): return n * (2 * n - 1)
funcs = (tri, pent, hexa) funcs = (tri, pent, hexa)
init = 20
n = [20] * 3 n = [init] * len(funcs)
vals = [f(20) for f in funcs] vals = [f(init) for f in funcs]
while len(set(vals)) > 1 or vals[0] == 40755: while len(set(vals)) > 1 or vals[0] == 40755:
mini = 0 mini = 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment