A pattern in a DNA sequence is defined using A, T, G, and, C repeatedly. Scientists often need to find the most recurring pattern of a specific length in the DNA sequence. Write a Python program stored in a file L6q2.py that takes a DNA sequence and the pattern length as inputs. The program should then print the most frequent pattern(s) of the requested length. Use a Python dictionary to store the patterns and their count.

Solved
Show answers

Ask an AI advisor a question