Question: start time: Questions (15 min) Python code Shell Output dna = 'CTGACGACTT' 18. Does the lower method change the contents of the dna string? Justify

 start time: Questions (15 min) Python code Shell Output dna =

start time: Questions (15 min) Python code Shell Output dna = 'CTGACGACTT' 18. Does the lower method change the contents of the dna string? Justify your answer. dna. lower() 19. Describe the list function---what does list(dna) return in Model 3? print(dna) lowercase = dna. lower() print(lowercase) 20. Why is it possible to call the replace method on dna [0] but not dna? dnalist = list(dna) print(dnalist) 21. Name several other string methods not shown in Model 3. (Read the documentation.) dnalist.reverse() print(dnalist) 22. Consider the application of a method on a variable: a. Does a string variable change after applying a method? Provide justification. type (dna) b. Does a list variable change after applying a method? Provide justification. dna = dna.split('A') C. Identify the data type that is immutable (i.e., the value never changes). print(dna) type (dna) 23. Write a single statement to change the final contents of dna to ['CTG', 'cc', 'CTT']. Confirm that your code works in a Python Shell. dna.replace('C', 'g') print(dna[0]) type (dna[0]) dna[0].replace('C', 'g')

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!