From ee270ebac59e8ac512a44e5fa974ab12f21e727f Mon Sep 17 00:00:00 2001
From: Fudgerboy <91767657+Fudgerboy@users.noreply.github.com>
Date: Mon, 20 May 2024 08:27:56 +0000
Subject: Mon, May 20, 2024, 1:27 AM -07:00

---
 wk6/pset/dna/dna.py | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

(limited to 'wk6/pset/dna/dna.py')

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
 
 
-- 
cgit v1.2.3