davecom/ClassicComputerScienceProblemsInPython

I get false false in this nucleotide search

Closed this issue · 2 comments

Great book. Favourite book currently.

I hand typed and then copy pasted the code from the dna search problem 2.1.1 and got

False
False

as my answers, not # true # false as commented.

Then I cut and pasted the code and got the same response. I can see that the codon acg is in the gene so I suspect a bug.

Massive noob so probably my fault. Happy to learn.

Hi @urowietu ,
My guess would be this is a copying error (perhaps you forgot to copy a part). You can download the full source code from this repository. Try downloading the repository and running python3 dna_search.py when in the correct directory in the terminal and see if you get the right results. Your installation of Python 3 may be python.
Thanks for reading,
Dave

Excellent. I get learn a new skill of using repositories.

Btw I heard you on that init podcast and that’s why I bought the book. And I have asked my favourite youtube tutor, Giles McMullen, to review your book.

The stuff I copied and pasted was from an online version of the book, I did not make that clear.

So, I will infer that you know the book’s code is sound, I will place weight on that, I will learn to handle the repo and if you hear nothing else from urowietu then it’s hasta luego until I raise my next erroneous issue. 🙂👍