Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 2. Processing DNA in a File (Page 93) The text for the problem is shown below) The file input.txt contains a number of DNA

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Problem 2. Processing DNA in a File (Page 93) The text for the problem is shown below) The file input.txt contains a number of DNA sequences, one per line. Each sequence starts with the same 14 base pair fragmenta sequencing adapter that should have been removed. Write a program that will fo) trim this adapter and write the cleaned sequences to a new file and (b) print the length of each sequence to the screen Download the file here. Here is the data from the file as well. ATTCGATTATAAGCTOGATCGATCGATCGATCGATCGATCGATCGATOGATCGATC ATTCGATTATAAGCACTGATCGATCGATCGATCGATCGATGCTATCGTCGT ATTCGATTATAAGCATCGATCACGATCTATCGTACGTATGCATATCGATATCGATCGTAGTC ATTCGATTATAAGCACTATCGATGATCTAGCTACGATCGTAGCTGTA ATTCGATTATAAGCACTAGCTAGTCTCGATGCATGATCAGCTTAGCTGATGATGCTATGCA Turn in your Python code and the file produced Upload both to Canvas Problem 3. Exercises with List Operations (page 81 and the video lecture) Using the lists below you can copy and paste them into your program) Write a program that performs the following operations on those lists. You can do al seven parts() in the same program. western states - Californu" Oregon Washington Nevada", "Montanat daho" southern states - 1"Florida Georgia Mississippi. "Alabama louisiana" two states - "Tennessee Kentucky' numbers [13, 24, 10, 18. 32. 27.9.171 a, Amend the list southern states such that it has the states shown below in that order ["Florida Georgia, "Mississippi, Alabama "Louisiana Tennessee Kentucky Print the original list and the updated southern states list to the screen b. Determine the number of states in the list western states, Print the number to the screen Print the last numbers to the screen such that the numbers are printed in ascending order d. Print the states in the updated list southern states to the screen in revene order, e. Update the list southern states again by adding the state "South Carolina between the states Florida and Georgia. The resulting the should look like this southern states - "Florida's "South Carolina Georgia, "Misshippi"Alatama Louisiana Tennessee, Kentucky Print the list to the screen Find and print to the screen the index of state "Nevada in list western states Delete the numbers to and 27 from the list numbers. Print the updated list to the screen, Upload your Python code and the screenshots of the output to Canva Problem 4. Turtle Graphics Design Following the Maple Leaf example in the video write a program that reads the coordinates from the file design one. But and employs the Turtle drawing commands to trace out a design. Turn in your code and a screenshot of the design, You can download the fee of coordinates here. The numbers are separated by a single space. Here are the coordinates as well 320 348 40 10 3214 18 16 128 36 412 18 -18 -412 -36 -128 -18 16 -3214 -40 10 -348 -320 -24-2 -20-10 -10-8 -4-10 -4-18 -2-14 0-16 2-14 4-18 4-10 10-8 20-10 24-2 320 Program 1: File Creation Write a Python program that will create a file that shows your class schedule for Fall 2020, The file should contain the following information: 1. Title: Class Schedule Spring 2021 2. List of courses with Course Day and Time Example: Class Schedule Spring 2021 COURSE DAY TIME CS100 MW 2:40 4:00 MH318 TR 11:20 12:40 Chem MW 8:00 - 9:20 Use your own classes or make up some examples. For this program you should use the Python input feature to read in the data for the file For example: course - input("Enter the course code:") day=input("Enter the days the course meets:") start_time=input("Enter the start time: end_time =input("Enter the end time:") Turn in your Python code and the file produced. Upload both to Canvas Problem 2. Processing DNA in a File (Page 93) (The text for the problem is shown below.) The file input.txt contains a number of DNA sequences, one per line. Each sequence starts with the same 14 base pair fragment - a sequencing adapter that should have been removed. Write a program that will (a) trim this adapter and write the cleaned sequences to a new file and (b) print the length of each sequence to the screen. Download the file here. Here is the data from the file as well. ATTOGATTATAAGCTCGATCGATCGATOGATCGATCGATCGATCGATCGATCGATC ATTCGATTATAAGCACTGATCGATCGATCGATCGATCGATGCTATCGTCGT ATTCGATTATAAGCATCGATCACGATCTATCGTACGTATGCATATCGATATCGATCGTAGTC ATTCGATTATAAGCACTATCGATGATCTAGCTACGATCGTAGCTGTA ATTCGATTATAAGCACTAGCTAGTCTCGATGCATGATCAGCTTAGCTGATGATGCTATGCA Turn in your Python code and the file produced Upload both to Canvas Problem 3. Exercises with List Operations (page 81 and the video lecture), Using the lists below (you can copy and paste them into your program) Weite a program that performs the following operations on those lists. You can do all seven parts (ag) in the same program western states = 1"California" "Oregon" "Washington" "Nevada" "Montana", "Idaho" southem_states = ["Florida", "Georgia: "Mississippi. "Alabama", "Louisiana" two states - [ Tennessee". Kentucky numbers-[13. 24. 10. 18, 32.27.9.17 a. Amend the list southern states such that it has the states shown below in that order ["Florida Georgia, "Mississippi", "Alabama", "Louisiana "Tennessee Kentucky Print the original list and the updated southern states list to the screen b. Determine the number of states in the list western states. Print the number to the screen. c. Print the list numbers to the screen such that the numbers are printed in ascending order. d. Print the states in the updated list southern states to the screen in reverse order. e. Update the list southern states again by adding the state "South Carolina" between the states Florida and Georgia. The resulting list should look like this southern_states - ("Florida: "South Carolina" "Georgia", "Mississippi" "Alabama", Louisiana, "Tennessee" "Kentucky Print the list to the screen. Find and print to the screen the index of state "Nevada in list western states 8. Delete the numbers 10 and 27 from the list numbers. Print the updated list to the screen Upload your Python code and the screenshots of the output to Canvas Problem 4. Turtle Graphics Design Following the Maple Leaf example in the video write a program that reads the coordinates from the file "design_one.txt and employs the Turtle drawing commands to trace out a design. Turn in your code and a screenshot of the design. You can download the file e of coordinates here. The numbers are separated by a single space. Here are the coordinates as well: 320 348 40 10 32 14 18 16 128 36 4 12 18 -18 -412 -36 -128 -18 16 -32 14 -40 10 -34 B -320 -24-2 -20 -10 -10-8 -4-10 -4-18 -2-14 0-16 2-14 4-18 4.10 10-8 20-10 24-2 320

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What are qualitative characteristics?

Answered: 1 week ago