From 000fc96aced80bc918100ff92372400197e619da Mon Sep 17 00:00:00 2001 From: Walt Mankowski Date: Wed, 26 Aug 2020 20:54:30 -0400 Subject: changed j to i This is because I thought I needed 2 loop variables but only ended up needing the inner one. --- challenge-075/walt-mankowski/python/ch-1.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'challenge-075/walt-mankowski/python/ch-1.py') diff --git a/challenge-075/walt-mankowski/python/ch-1.py b/challenge-075/walt-mankowski/python/ch-1.py index b070bcb102..83ed4c23f9 100644 --- a/challenge-075/walt-mankowski/python/ch-1.py +++ b/challenge-075/walt-mankowski/python/ch-1.py @@ -15,15 +15,15 @@ while (True): # rotate "odometer" cnt[-1] = 0 - j = -2 - cnt[j] += 1 - while j >= -len(cnt) and np.dot(c, cnt) > s: - cnt[j] = 0 - j -= 1 - if j >= -len(cnt): - cnt[j] += 1 + i = -2 + cnt[i] += 1 + while i >= -len(cnt) and np.dot(c, cnt) > s: + cnt[i] = 0 + i -= 1 + if i >= -len(cnt): + cnt[i] += 1 - if j < -len(cnt): + if i < -len(cnt): break else: cnt[-1] += 1 -- cgit