The following runs just one time out of five:
import math
for a1 in range (1,9,1):
for a2 in range (1,9,1):
for a3 in range (1,9,1):
for a4 in range (1,9,1):
for a5 in range (1,9,1):
for a6 in range (1,9,1):
for a7 in range (1,9,1):
for a8 in range (1,9,1):
for a9 in range (1,9,1):
if a1+a2+a3+a4+a5+a6+a7+a8+a9 == 11:
print a1,a2,a3,a4,a5,a6,a7,a8,a9
What am I doing wrong?
Edwin M.
import math
for a1 in range (1,9,1):
for a2 in range (1,9,1):
for a3 in range (1,9,1):
for a4 in range (1,9,1):
for a5 in range (1,9,1):
for a6 in range (1,9,1):
for a7 in range (1,9,1):
for a8 in range (1,9,1):
for a9 in range (1,9,1):
if a1+a2+a3+a4+a5+a6+a7+a8+a9 == 11:
print a1,a2,a3,a4,a5,a6,a7,a8,a9
What am I doing wrong?
Edwin M.