Question: Write a function has_kitty_gene(dna) in python that passes the following doctests. #RQ3 def has_kitty_gene(dna): Returns whether the linked list dna contains the CATCAT gene as

Write a function has_kitty_gene(dna) in python that passes the following doctests.

#RQ3 def has_kitty_gene(dna):

"""Returns whether the linked list dna contains the CATCAT gene as a sublist.

>>> dna = link('C', link('A', link('T'))) >>> dna = link('C', link('A', link('T', link('G', dna)))) >>> print_link(dna) C A T G C A T >>> has_kitty_gene(dna) False >>> end = link('T', link('C', link('A', link('T', link('G'))))) >>> dna = link('G', link('T', link('A', link('C', link('A', end))))) >>> print_link(dna) G T A C A T C A T G >>> has_kitty_gene(dna) True >>> has_kitty_gene(end) False """

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!