summaryrefslogtreecommitdiff
path: root/wk6/pset
diff options
context:
space:
mode:
Diffstat (limited to 'wk6/pset')
-rw-r--r--wk6/pset/dna/dna.py21
1 files changed, 17 insertions, 4 deletions
diff --git a/wk6/pset/dna/dna.py b/wk6/pset/dna/dna.py
index dbd140d..4f967a9 100644
--- a/wk6/pset/dna/dna.py
+++ b/wk6/pset/dna/dna.py
@@ -41,12 +41,25 @@ def main():
else:
matches.append('')
- print(fields)
- print(matches)
+ # print(rows)
+ # print(fields)
+ # print(matches)
# TODO: Check database for matching profiles
- for row in rows:
-
+ for person in rows:
+ print(person)
+ counter = 0
+ for i in range(len(fields)):
+ if fields[i] != 'name':
+ if person[fields[i]] != matches[i]:
+ break
+ else:
+ counter += 1
+ if counter == range(len(fields)):
+ print(person[0])
+ return
+
+ print('No match')
return