#type your code here

"""
Explanation: Question 1:
For basic operation using list, tuple and dictionaries
1.1
a. Finds the largest of a list of numbers.
<br>Hint: Set up the list as the first line in your program.<br>
Output: The largest number in the list is 26
End of explanation
"""


runningTotal = 0
listOfNumbers = [4,7,9,1,8,6]

#type your code here

print(listOfNumbers)
print("The average of these numbers is {0:.2f}".format(average))

"""
Explanation: 1.1
b. Find the average of a list of numbers using a for loop
End of explanation
"""


word = "Python"
print(len(word))

#type your code here

"""
Explanation: 1.1
c. Write a program that prints string in reverse. Print character by character
Input: Python
Expected Output: 
n
o
h
t
y
P
Hint: can use range, len functions<br>
P  y  t  h  o  n
0  1  2  3  4  5
-6 -5 -4 -3 -2 -1
End of explanation
"""


numbers = (1, 2, 3, 4, 5, 6, 7, 8, 9) # Declaring the tuple
count_odd = 0
count_even = 0

#type your code here

print("Number of even numbers :",count_even)
print("Number of odd numbers :",count_odd)

"""
Explanation: 1.2
Write a Python program to count the number of even and odd numbers from a series of numbers.
<br>Hint: review of for loop, if statements
End of explanation
"""


motif = "GAATTC"
count = 0
dna_strings = ['AGTGAACCGTCAGATCCGCTAGCGCGAATTC','GGAGACCGACACCCTCCTGCTATGGGTGCTGCTGCTC','TGGGTGCCCGGCAGCACCGGCGACGCACCGGTCGC',
               'CACCATGGTGAGCAAGGGCGAGGAGAATAACATGGCC','ATCATCAAGGAGTTCATGCGCTTCAAGAATTC','CATGGAGGGCTCCGTGAACGGCCACGAGTTCGAGA'
               ,'TCGAGGGCGAGGGCGAGGGCCGCCCCTACGAGGCCTT']
#type your code


"""
Explanation: 1.3
Check if given list of strings have ECORI site motif and print value that doesn't contain the motif until two strings with the motif are found
motif = "GAATTC"  (5' for ECORI restriction site)
Output:
<br>AGTGAACCGTCAGATCCGCTAGCGCGAATTC doesn't contain the motif
GGAGACCGACACCCTCCTGCTATGGGTGCTGCTGCTC doesn't contain the motif
TGGGTGCCCGGCAGCACCGGCGACGCACCGGTCGC doesn't contain the motif
CACCATGGTGAGCAAGGGCGAGGAGAATAACATGGCC doesn't contain the motif
Two strings in given list contain the motif
End of explanation
"""


#type your code here


"""
Explanation: 1.4
Write a Python program that prints all the numbers in range from 0 to 10 except 5 and 10.
<br> Hint: use continue
End of explanation
"""


#type your code

"""
Explanation: 1.5 (Multi-Part)
Next series of tasks about lists and list manipulations:
<br>a. Create a list of 5 of your favorite things.
End of explanation
"""


#type your code

"""
Explanation: b. Use the print() function to print your list.
End of explanation
"""


#type your code

"""
Explanation: c. Use the print() function to print out the middle element.
End of explanation
"""


#type your code

"""
Explanation: d. Now replace the middle element with a different item, your favorite song, or song bird.
End of explanation
"""


#type your code

"""
Explanation: e. Use the same print statement from b. to print your new list. Check out the differences.
End of explanation
"""


#type your code

"""
Explanation: f. Add a new element to the end. Read about append().
End of explanation
"""


#type your code

"""
Explanation: g. Add a new element to the beginning. Read about insert().
End of explanation
"""


#type your code

"""
Explanation: h. Add a new element somewhere other than the beginning or the end.
End of explanation
"""


#type your code


"""
Explanation: 1.6
Write a script that splits a string into a list:

Save the string sapiens, erectus, neanderthalensis as a variable.
Print the string.
Split the string into individual words and print the result of the split. (Think about the ', '.)
Store the resulting list in a new variable.
Print the list.
Sort the list alphabetically and print (hint: lookup the function sorted()).
Sort the list by length of each string and print. (The shortest string should be first). Check out documentation of the key argument.`
End of explanation
"""


#type your code

"""
Explanation: Question 2: Dictionaries and Set
2.1
Create a dictionary store DNA restriction enzyme names and their motifs from:
<br>https://www.neb.com/tools-and-resources/selection-charts/alphabetized-list-of-recognition-specificities
<br>eg:
EcoRI = GAATTC
AvaII = GGACC
BisI  = GGACC
End of explanation
"""


#type your code

"""
Explanation: a. look up the motif for a particular SacII enzyme
End of explanation
"""


#type your code

"""
Explanation: b. add below two enzymes and their motifs to dictionary
<br>
KasI: GGCGCC
AscI: GGCGCGCC
EciI: GGCGGA
End of explanation
"""


dna = 'AAATTCGTGACTGTAA'
#type your code here

"""
Explanation: 2.2
Suppose dna is a string variable that contains only 'A','C','G' or 'T' characters. 
Write code to find and print the character and frequency (max_freq) of the most frequent character in string dna?
<br>
Output:
{'T': 5, 'C': 2, 'G': 3, 'A': 6}<br>
6
End of explanation
"""


#type your code here

"""
Explanation: 2.3
If you create a set using a DNA sequence, what will you get back? Try it with this sequence:
GATGGGATTGGGGTTTTCCCCTCCCATGTGCTCAAGACTGGCGCTAAAAGTTTTGAGCTTCTCAAAAGTCTAGAGCCACCGTCCAGGGAGCAGGTAGCTGCTGGGCTCCGGGGACACTTTGCGTTCGGGCTGGGAGCGTGCTTTCCACGACGGTGACACGCTTCCCTGGATTGGCAGCCAGACTGCCTTCCGGGTCACTGCCATGGAGGAGCCGCAGTCAGATCCTAGCGTCGAGCCCCCTCTGAGTCAGGAAACATTTTCAGACCTATGGAAACTACTTCCTGAAAACAACGTTCTGTCCCCCTTGCCGTCCCAAGCAATGGATGATTTGATGCTGTCCCCGGACGATATTGAACAATGGTTCACTGAAGACCCAGGTCCAGATGAAGCTCCCAGAATTCGCCAGAGGCTGCTCCCCCCGTGGCCCCTGCACCAGCAGCTCCTACACCGGCGGCCCCTGCACCAGCCCCCTCCTGGCCCCTGTCATCTTCTGTCCCTTCCCAGAAAACCTACCAGGGCAGCTACGGTTTCCGTCTGGGCTTCTTGCATTCTGGGACAGCCAAGTCTGTGACTTGCACGTACTCCCCTGCCCTCAACAAGATGTTTTGCCAACTGGCCAAGACCTGCCCTGTGCAGCTGTGGGTTGATTCCACACCCCCGCCCGGCACCCGCGTCCGCGCCATGGCCATCTACAAGCAGTCACAGCACATGACGGAGGTTGTGAGGCGCTGCCCCCACCATGAGCGCTGCTCAGATAGCGATGGTCTGGCCCCTCCTCAGCATCTTATCCGAGTGGAAGGAAATTTGCGTGTGGAGTATTTGGATGACAGAAACACTTTTCGTGGGGTTTTCCCCTCCCATGTGCTCAAGACTGGCGCTAAAAGTTTTGAGCTTCTCAAAAGTCTAGAGCCACCGTCCAGGGAGCAGGTAGCTGCTGGGCTCCGGGGACACTTTGCGTTCGGGCTGGGAGCGTGCTTTCCACGACGGTGACACGCTTCCCTGGATTGGCAGCCAGACTGCCTTCCGGGTCACTGCCATGGAGGAGCCGCAGTCAGATCCTAGCGTCGAGCCCCCTCTGAGTCAGGAAACATTTTCAGACCTATGGAAACTACTTCCTGAAAACAACGTTCTGTCCCCCTTGCCGTCCCAAGCAATGGATGATTTGATGCTGTCCCCGGACGATATTGAACAATGGTTCACTGAAGACCCAGGTCCAGATGAAGCTCCCAGAATTCGCCAGAGGCTGCTCCCCCCGTGGCCCCTGCACCAGCAGCTCCTACACCGGCGGCCCCTGCACCAGCCCCCTCCTGGCCCCTGTCATCTTCTGTCCCTTCCCAGAAAACCTACCAGGGCAGCTACGGTTTCCGTCTGGGCTTCTTGCATTCTGGGACAGCCAAGTCTGTGACTTGCACGTACTCCCCTGCCCTCAACAAGATGTTTTGCCAACTGGCCAAGACCTGCCCTGTGCAGCTGTGGGTTGATTCCACACCCCCGCCCGGCACCCGCGTCCGCGCCATGGCCATCTACAAGCAGTCACAGCACATGACGGAGGTTGTGAGGCGCTGCCCCCACCATGAGCGCTGCTCAGATAGCGATGGTCTGGCCCCTCCTCAGCATCTTATCCGAGTGGAAGGAAATTTGCGTGTGGAGTATTTGGATGAC
End of explanation
"""


sequences=['ATGCCCGGCCCGGC','GCGTGCTAGCAATACGATAAACCGG', 'ATATATATCGAT','ATGGGCCC']
#type your code here

"""
Explanation: Extra Pratice: 1.7
Use list comprehension to generate a list of tuples. The tuples should contain sequences and lengths from the previous problem. Print out the length and the sequence (i.e., "4\tATGC\n").
End of explanation
"""


