## Programming Assignment #2 ## do not remove the extra print statements print('Question 1') ################################################################# # QUESTION 1 # # Using substrings, write a statement that would print out the # # string DNA, but it would leave out the position indexed by 5 # # where 5 is the index in python 0-based indexing). # ################################################################# ##add code for question 1 here DNA = "TGCTAGCATCGATGCTGACTGATCGAC" ## do not remove the extra print statements print('Question 2') ################################################################# # QUESTION 2 # # Define a variable "i" that has the value of 3. Then define a # # variable "j" that has a value of 11. Then define a random # # string called "DNA" that is 15 characters long (something # # other than all one or two characters, something complex). # # # # Then print the substring of DNA starting i and of length j. # # your substring should be in terms of the variables i and j. # ################################################################# ##add code for question 2 here ## do not remove the extra print statements print('Question 3') ################################################################# # QUESTION 3 # # Define a subsequence and print statement that would print every # # third character starting at the first 'G' for the provided # # DNA sequence: # # DNA = 'TTCAGTGACTGATCGATCGATGCTAGCTAGCTAGC' # ################################################################# ##add code for question 3 here DNA = 'TTCAGTGACTGATCGATCGATGCTAGCTAGCTAGC' ## do not remove the extra print statements print('Question 4') ################################################################# # QUESTION 4 # # Define as subsequence and print statement that would print # # every other character of the following sequence in reverse # # starting at the last T: # # # # DNA = "GACTATGATCGTAGTGATCGTAGCTAGCTAGCATCGTAGGC" # ################################################################# ##add code for question 4 here DNA = "GACTATGATCGTAGTGATCGTAGCTAGCTAGCATCGTAGGC" ## do not remove the extra print statements print('Question 5') ################################################################# # QUESTION 5 # # Given the two strings, convert them both to int data types, # # and add the associated numerical values, then convert the # # resulting sum to a string, and print the resulting sum string # variable ################################################################# ##add code for question 4 here x = '784' y = '541'