''' # RNA to mRNA (error types II) This code checks the length of an RNA strand and the maximum potential length of its corresponding protein. Next, it turns the RNA strand into an mRNA strand and checks whether this was successful. The code below will give an error. Figure out the type and the source of the error and fix it. ''' RNA_strand = "ACGACCGGGAAGCACGGACCGGAAGGCGCGACCAAGGCGCACGGGACGUGAACGCCGACGGGACCGGCGACGAC" # Determination of characteristics length_of_RNA_strand = len(RNA_strand) mod_RNA_bases = lenght_of_RNA_strand % 3 # Here, we calculate how many bases are not part of a triplet maximum_potential_length_protein = (length_of_RNA_strand - mod_RNA_bases) / 3 print(f"The maximum potential length of the protein is {maximum_potential_length_protein:.0f} amino acids.") # Transformation into mRNA G_cap = "G" poly_A_tail = "AAAAAAAAAAAAAAAA" mRNA_strand = G_cap + RNA_strand + poly_A_tail successfully_G_capped = (mRNA_strand[0] == "G") # Looks at the first character in the string successfully_A_tailed = (mRNA_strand[-5:-1] == "AAAA") # Looks at the final four characters print(f"The RNA strand has been successfully transformed into mRNA: {successfully_A_tailed and successfully_G_capped}") # The word "and" only returns True if both conditions are True.