Write a function to achieve the following: Given three sequences of equal length, count how many sites (i.e., columns) are identical among all three of them. For example, if the three sequences are: index: 01234567 human: AAGCTGGC chimp: AGGCTAGC mouse: AGCATGGT The number of identical sites is 3. (A at 0, T at 4, G at 6). • Hint: You can either iterate over indices, or use zip on all three sequences. [] def same_3way(seq1, seq2, seq3): # YOUR CODE HERE
Added by Jodi T.
Close
Step 1
Step 1: Define the function same_3way with three parameters seq1, seq2, and seq3. Show more…
Show all steps
Your feedback will help us improve your experience
Areen Dabadghav and 73 other Algebra educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Count the number of primitive operations and calculate the time complexity? def foo(lst): result1 = 1 Result2 = 6 for i in range(len(lst)): for j in range(len(lst)): result1 += i*j result2 = lst[j] + i return
Areen D.
def counting(n): for i in range(1, n): print(i)
Willis J.
In Python, Given a list of numbers, return a list where all adjacent == elements have been reduced to a single element, so [1,2,2,3,3,2,2,4] returns [1,2,3,2,4]. You may create a new list or modify the passed in list (set function does not work in this case).
Akash M.
Recommended Textbooks
Elementary and Intermediate Algebra
Algebra and Trigonometry
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD