Position 0 has the letter A
Position 1 has the letter T
Position 2 has the letter C
Position 3 has the letter G
range()
and len()
¶sequence = 'AUGUUUUUGAUACUUU'
sequence = 'AUGUUUUUGAUACUUU'
# your code here
my_string = 'I love Bioinformatics so much!'
rna_sequence = 'AUGUUUUUGAUACUUUUAAUUUCCUUACCAACGGCUUUUGCUGUUAUAGGAGAUUUAAAGUGUACUACAGUUUCCAUUAAUGAUGUUGACACUGGUGUUCCUUCUAUUAGCACUGAUACUGUCGAUGUUACUAAUGGUUUAGGUACUUAUUAUGUUUUAGAUCGUGUGUAUUUAAAUACUACGUUGUUGCUUAAUGGUUAUUACCCUACUUCAGGUUCUACAUAUCGUAAUAUGGCACUGAAGGGAACUUUACUAUUGAGCACACUGUGGUUUAAACCACCUUUUCUUUCUGAUUUUACUAAUGG'
# your code here
rna_sequence = 'AUGUUUUUGAUACUUUUAAUUUCCUUACCAACGGCUUUUGCUGUUAUAGGAGAUUUAAAGUGUACUACAGUUUCCAUUAAUGAUGUUGACACUGGUGUUCCUUCUAUUAGCACUGAUACUGUCGAUGUUACUAAUGGUUUAGGUACUUAUUAUGUUUUAGAUCGUGUGUAUUUAAAUACUACGUUGUUGCUUAAUGGUUAUUACCCUACUUCAGGUUCUACAUAUCGUAAUAUGGCACUGAAGGGAACUUUACUAUUGAGCACACUGUGGUUUAAACCACCUUUUCUUUCUGAUUUUACUAAUGG'
stop_codon_list = ['UGA','UAA','UAG']
# your code here
start_codons
, and all stop codon positions in the list stop_codons
¶rna_sequence = 'AUGUUUUUGAUACUUUUAAUUUCCUUACCAACGGCUUUUGCUGUUAUAGGAGAUUUAAAGUGUACUACAGUUUCCAUUAAUGAUGUUGACACUGGUGUUCCUUCUAUUAGCACUGAUACUGUCGAUGUUACUAAUGGUUUAGGUACUUAUUAUGUUUUAGAUCGUGUGUAUUUAAAUACUACGUUGUUGCUUAAUGGUUAUUACCCUACUUCAGGUUCUACAUAUCGUAAUAUGGCACUGAAGGGAACUUUACUAUUGAGCACACUGUGGUUUAAACCACCUUUUCUUUCUGAUUUUACUAAUGG'
stop_codon_list = ['UGA','UAA','UAG']
start_codons = []
stop_codons = []
# your code here
def my_new_function():
print('this is a function')
my_new_function()
this is a function
def a_new_function(first_argument, second_argument):
print('the first argument is: ' + first_argument)
print('the second argument is: ' + second_argument)
a_new_function('Cat','Dog')
the first argument is: Cat the second argument is: Dog
def uh_oh():
print("did it work?")
Input In [10] print("did it work?") ^ IndentationError: expected an indented block
def uh_oh()
print("did it work?")
Input In [13] def uh_oh() ^ SyntaxError: invalid syntax
def uh_oh('an_argument'):
print("did it work?")
Input In [15] def uh_oh('an_argument'): ^ SyntaxError: invalid syntax
def function_with_arguments(first, second):
print(first + second)
function_with_arguments('python ','is cool')
print(first + second)
python is cool
--------------------------------------------------------------------------- NameError Traceback (most recent call last) Input In [21], in <cell line: 4>() 2 print(first + second) 3 function_with_arguments('python ','is cool') ----> 4 print(first + second) NameError: name 'first' is not defined
# your code here
# your code here
def my_sum_function(one, two, three):
output_sum = int(one) + int(two) + int(three)
return output_sum
output = my_sum_function(3,5,7)
print(output)
15
def make_a_list(one, two, three):
output_list = [one,two,three]
return output_list
output = make_a_list(3,5,7)
print(output)
[3, 5, 7]
# your code here
def print_sum(statement):
print("the sum of the numbers is: " + str(statement))
def calculate_sum(number_one, number_two):
my_sum = number_one + number_two
print_sum(my_sum)
calculate_sum(6,10)
the sum of the numbers is: 16
# your code here
# your code here