I am really really close to completing pset/dna. But there seems to be some problem in the 'if statement'. Somebody please guide. Before the line of underscores in the terminal, I have printed the value of STRs as calculated by my code. After the line, as you can see in the code, I am comparing my observation values with the values of individuals of the database, but it's not working in the desirable way. I'm missing something i guess. PS. Answer of this particular test case should be Bob.
1 Answer
Your observation[key]
is an integer. row[key]
is a string. When you do observation[key] != row[key]
, (In this case 4 != '4')it will be true, breaking the loop.
So to fix this issue, do observation[key] != int(row[key])