diff options
| author | Walt Mankowski <waltman@pobox.com> | 2020-08-26 20:54:30 -0400 |
|---|---|---|
| committer | Walt Mankowski <waltman@pobox.com> | 2020-08-26 20:54:30 -0400 |
| commit | 000fc96aced80bc918100ff92372400197e619da (patch) | |
| tree | d66a681eff1e07821628899c24c32b73c332f1fb /challenge-075/walt-mankowski/python | |
| parent | f09ff0b5b57f38aa13376ffd3cd5d642c8d75a3b (diff) | |
| download | perlweeklychallenge-club-000fc96aced80bc918100ff92372400197e619da.tar.gz perlweeklychallenge-club-000fc96aced80bc918100ff92372400197e619da.tar.bz2 perlweeklychallenge-club-000fc96aced80bc918100ff92372400197e619da.zip | |
changed j to i
This is because I thought I needed 2 loop variables but only ended up
needing the inner one.
Diffstat (limited to 'challenge-075/walt-mankowski/python')
| -rw-r--r-- | challenge-075/walt-mankowski/python/ch-1.py | 16 |
1 files changed, 8 insertions, 8 deletions
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 |
