Question: Please write a function called describeGenome that accepts two arguments. The first argument will be a string; it should be called genome and should have

Please write a function called describeGenome that accepts two arguments. The first argument will be a string; it should be called genome and should have a default value of human. The second argument will be an integer; it should be called numChromosomePairs and should have a default value of 23. We will check your code by using keyword arguments to make sure it is functioning correctly, so be sure to name your arguments correctly.

Your function should use the genome and numChromosomePairs values to return a string that indicates how many pairs of chromosomes are present in the specified genome. For example, if the default values are used, your function would return, "The human genome has 23 pairs of chromosomes." Or if the genome argument were "fruit fly" and the numChromosomes argument were 4, your function would return, "The fruit fly genome as 4 pairs of chromosomes."

hint: use the the string formatting trick -> f"

Test code (to be executed after your solution):

print(describeGenome()) print(describeGenome("fruit fly", 4)) print(describeGenome("meadow vole")) print(describeGenome("Stalked Adders tongue", 1260)) print(describeGenome(numChromosomePairs = 4, genome = "fruit fly")) print(describeGenome(numChromosomePairs = 23)) print(describeGenome(genome = "meadow vole")) print(describeGenome(numChromosomePairs = 24)) print(describeGenome(numChromosomePairs=4, genome="fruit fly")) print(describeGenome(genome="Stalked Adder's tongue", numChromosomePairs=1260))

Expected Output:

The human genome has 23 pairs of chromosomes. The fruit fly genome has 4 pairs of chromosomes. The meadow vole genome has 23 pairs of chromosomes. The Stalked Adders tongue genome has 1260 pairs of chromosomes. The fruit fly genome has 4 pairs of chromosomes. The human genome has 23 pairs of chromosomes. The meadow vole genome has 23 pairs of chromosomes. The human genome has 24 pairs of chromosomes. The fruit fly genome has 4 pairs of chromosomes. The Stalked Adder's tongue genome has 1260 pairs of chromosomes.

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!