In [9]:
#type your code here
In [1]:
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))
In [2]:
word = "Python"
print(len(word))
#type your code here
In [65]:
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)
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:
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
In [66]:
motif = "GAATTC"
count = 0
dna_strings = ['AGTGAACCGTCAGATCCGCTAGCGCGAATTC','GGAGACCGACACCCTCCTGCTATGGGTGCTGCTGCTC','TGGGTGCCCGGCAGCACCGGCGACGCACCGGTCGC',
'CACCATGGTGAGCAAGGGCGAGGAGAATAACATGGCC','ATCATCAAGGAGTTCATGCGCTTCAAGAATTC','CATGGAGGGCTCCGTGAACGGCCACGAGTTCGAGA'
,'TCGAGGGCGAGGGCGAGGGCCGCCCCTACGAGGCCTT']
#type your code
In [67]:
#type your code here
In [68]:
#type your code
b. Use the print() function to print your list.
In [69]:
#type your code
c. Use the print() function to print out the middle element.
In [70]:
#type your code
d. Now replace the middle element with a different item, your favorite song, or song bird.
In [71]:
#type your code
e. Use the same print statement from b. to print your new list. Check out the differences.
In [72]:
#type your code
f. Add a new element to the end. Read about append().
In [74]:
#type your code
g. Add a new element to the beginning. Read about insert().
In [75]:
#type your code
h. Add a new element somewhere other than the beginning or the end.
In [76]:
#type your code
Write a script that splits a string into a list:
In [77]:
#type your code
Create a dictionary store DNA restriction enzyme names and their motifs from:
https://www.neb.com/tools-and-resources/selection-charts/alphabetized-list-of-recognition-specificities
eg:
EcoRI = GAATTC
AvaII = GGACC
BisI = GGACC
In [79]:
#type your code
a. look up the motif for a particular SacII enzyme
In [80]:
#type your code
b. add below two enzymes and their motifs to dictionary
KasI: GGCGCC
AscI: GGCGCGCC
EciI: GGCGGA
In [81]:
#type your code
In [3]:
dna = 'AAATTCGTGACTGTAA'
#type your code here
If you create a set using a DNA sequence, what will you get back? Try it with this sequence:
GATGGGATTGGGGTTTTCCCCTCCCATGTGCTCAAGACTGGCGCTAAAAGTTTTGAGCTTCTCAAAAGTCTAGAGCCACCGTCCAGGGAGCAGGTAGCTGCTGGGCTCCGGGGACACTTTGCGTTCGGGCTGGGAGCGTGCTTTCCACGACGGTGACACGCTTCCCTGGATTGGCAGCCAGACTGCCTTCCGGGTCACTGCCATGGAGGAGCCGCAGTCAGATCCTAGCGTCGAGCCCCCTCTGAGTCAGGAAACATTTTCAGACCTATGGAAACTACTTCCTGAAAACAACGTTCTGTCCCCCTTGCCGTCCCAAGCAATGGATGATTTGATGCTGTCCCCGGACGATATTGAACAATGGTTCACTGAAGACCCAGGTCCAGATGAAGCTCCCAGAATTCGCCAGAGGCTGCTCCCCCCGTGGCCCCTGCACCAGCAGCTCCTACACCGGCGGCCCCTGCACCAGCCCCCTCCTGGCCCCTGTCATCTTCTGTCCCTTCCCAGAAAACCTACCAGGGCAGCTACGGTTTCCGTCTGGGCTTCTTGCATTCTGGGACAGCCAAGTCTGTGACTTGCACGTACTCCCCTGCCCTCAACAAGATGTTTTGCCAACTGGCCAAGACCTGCCCTGTGCAGCTGTGGGTTGATTCCACACCCCCGCCCGGCACCCGCGTCCGCGCCATGGCCATCTACAAGCAGTCACAGCACATGACGGAGGTTGTGAGGCGCTGCCCCCACCATGAGCGCTGCTCAGATAGCGATGGTCTGGCCCCTCCTCAGCATCTTATCCGAGTGGAAGGAAATTTGCGTGTGGAGTATTTGGATGACAGAAACACTTTTCGTGGGGTTTTCCCCTCCCATGTGCTCAAGACTGGCGCTAAAAGTTTTGAGCTTCTCAAAAGTCTAGAGCCACCGTCCAGGGAGCAGGTAGCTGCTGGGCTCCGGGGACACTTTGCGTTCGGGCTGGGAGCGTGCTTTCCACGACGGTGACACGCTTCCCTGGATTGGCAGCCAGACTGCCTTCCGGGTCACTGCCATGGAGGAGCCGCAGTCAGATCCTAGCGTCGAGCCCCCTCTGAGTCAGGAAACATTTTCAGACCTATGGAAACTACTTCCTGAAAACAACGTTCTGTCCCCCTTGCCGTCCCAAGCAATGGATGATTTGATGCTGTCCCCGGACGATATTGAACAATGGTTCACTGAAGACCCAGGTCCAGATGAAGCTCCCAGAATTCGCCAGAGGCTGCTCCCCCCGTGGCCCCTGCACCAGCAGCTCCTACACCGGCGGCCCCTGCACCAGCCCCCTCCTGGCCCCTGTCATCTTCTGTCCCTTCCCAGAAAACCTACCAGGGCAGCTACGGTTTCCGTCTGGGCTTCTTGCATTCTGGGACAGCCAAGTCTGTGACTTGCACGTACTCCCCTGCCCTCAACAAGATGTTTTGCCAACTGGCCAAGACCTGCCCTGTGCAGCTGTGGGTTGATTCCACACCCCCGCCCGGCACCCGCGTCCGCGCCATGGCCATCTACAAGCAGTCACAGCACATGACGGAGGTTGTGAGGCGCTGCCCCCACCATGAGCGCTGCTCAGATAGCGATGGTCTGGCCCCTCCTCAGCATCTTATCCGAGTGGAAGGAAATTTGCGTGTGGAGTATTTGGATGAC
In [83]:
#type your code here
In [78]:
sequences=['ATGCCCGGCCCGGC','GCGTGCTAGCAATACGATAAACCGG', 'ATATATATCGAT','ATGGGCCC']
#type your code here