diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-05-20 08:33:43 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-05-20 08:33:43 +0000 |
commit | 2f0751dd944810129163e7e4a34f1bd86a014766 (patch) | |
tree | fd3a4c6e83d4d7ff76ec440e7c4bbb808cdb0839 /wk6/pset | |
parent | 06a5467631fb6024c7f6e9dfac9d28a8c936c831 (diff) |
Mon, May 20, 2024, 1:33 AM -07:00
Diffstat (limited to 'wk6/pset')
-rw-r--r-- | wk6/pset/dna/dna.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/wk6/pset/dna/dna.py b/wk6/pset/dna/dna.py index 0196256..00e148e 100644 --- a/wk6/pset/dna/dna.py +++ b/wk6/pset/dna/dna.py @@ -51,11 +51,11 @@ def main(): counter = 0 for i in range(len(fields)): if fields[i] != 'name': - if person[fields[i]] != matches[i]: - print(person[fields[i]], matches[i]) - break - else: + if person[fields[i]] == matches[i]: counter += 1 + print(counter) + else: + break print(counter, ',', len(fields)) if counter == len(fields): print(person['name']) |