1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Dafna1 [17]
3 years ago
7

Create your own Python file in a code editor of choice and begin writing functions as defined below. Your function names, inputs

, and outputs should be exactly as described. Please make sure you follow the coding guidelines from the main rubric! def dna_count(dna): This function takes in a string representing a DNA sequence and returns a list or tuple of four integers representing the number of times each nucleotide A, C, G, or T occur in the DNA string, in that order.
Biology
1 answer:
hoa [83]3 years ago
3 0

Answer:

In python:

def dna_count(dna):

   A = dna.count('A');    C = dna.count('C')

   G = dna.count('G');    T = dna.count('T')

   dna_countlist = []

   dna_countlist.append(A)    dna_countlist.append(C)

   dna_countlist.append(G)    dna_countlist.append(T)

   return dna_countlist

   

dna = input("DNA: ")

print(dna_count(dna))

Explanation:

This defines the function

def dna_count(dna):

This counts the occurrence of A and C

   A = dna.count('A');    C = dna.count('C')

This counts the occurrence of G and T

   G = dna.count('G');    T = dna.count('T')

This creates an empty list

   dna_countlist = []

This appends the occurrence of A and C to the empty list

   dna_countlist.append(A)    dna_countlist.append(C)

This appends the occurrence of G and T to the list

   dna_countlist.append(G)    dna_countlist.append(T)

This returns the list

   return dna_countlist

The main begins here

This prompts the user for the DNA string

dna = input("DNA: ")

This calls the dna_count function and also prints the returned list

print(dna_count(dna))

You might be interested in
Why is carbon essential to all known life on Earth?
ser-zykov [4K]
Carbon forms the key component for all known life on Earth. Carbon is the basis of all molecules. Its is easily able to bond because of the 4 valence electrons.
4 0
3 years ago
Write a procedure for an experiment that tests how a paper airplane's shape affects the distance it will fly. Then, describe how
nlexa [21]

Answer:Plz help me

Explanation:

Plz help me

7 0
3 years ago
What is the main difference between vascular and nonvascular plants?
Fantom [35]
 vascular transports water, distributtes food, and found in the roots, stems, and leaves. <span> vascular plants grow faster and taller.

</span><span>nonvascular plants do not grow taller like the mosses.</span>
6 0
3 years ago
Read 2 more answers
Which global water rights issue does the tippy tap technology help solve?
Mashutka [201]

Answer:

a. lack of running water

Explanation:

The Tippy tap technology was invented to solve the issue of running water problem. This technology is designed mainly for hand washing and it is used in the rural area to solve the running water problem.

This technology technique needs only forty milliliters of water; it is less expensive and reduces the chance of transmitting diseases as the user only touches a bar of soap suspended by a string.

8 0
4 years ago
What happens as electrons pass down the electron transport chain
Leto [7]

Answer:

They slowly lose energy.

Explanation:

High-energy electrons give the chain either NADH or FADH2 to complete it.

Low-energy electrons form water by decreasing the oxygen molecules.

5 0
3 years ago
Read 2 more answers
Other questions:
  • What does the T stands for in T-cells?
    6·1 answer
  • What is the journey of carbohydrates in Digestion
    12·1 answer
  • Phenylketonuria (PKU) is a recessive human disorder in which an individual cannot appropriately metabolize the amino acid phenyl
    8·1 answer
  • The eel is an example of a fish that is suited to both fresh water and sea water. Which zone of a estuary would you expect to fi
    11·1 answer
  • A star has a mass fifty times greater than Earth's sun, very high teperature, and is very bright. What will most likely happen t
    12·2 answers
  • Which of these genes is not a part of the lac operon
    11·1 answer
  • In a terrestrial ecosystem, mice eat the corn from the field, and the hawks eat the mice. Which explains whether or not the hawk
    8·1 answer
  • Why is water such an important component of soils?
    9·1 answer
  • The microscopic filtering units found in the kidneys that are responsible for urine formation are called
    11·1 answer
  • 26. Northern Harrier Hawks, also known as Marsh Hawks, get their name from their hunting
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!