Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

2. Bacterial Growth: Suppose that a microbiologist performs experiment in which

ID: 3607442 • Letter: 2

Question

2. Bacterial Growth: Suppose that a microbiologist performs experiment in which she measures the rate at which a specific type of bacterium reproduces asexually in different culture media. The experiment shows that in Medium A the bacteria repro- duce once every 60 minutes, and in Medium B the bacteria reproduce once every 90 minutes. Assume that a single bacteria is placed on culture medium at the beginning of the experiment. Write a program that calculates and plots the number of bacteria present in each culture at intervals of three hours from beginning of the experiment until 24 hours have elapsed. Make two plots, one a linear y plot and the other linear-log plot. How do the numbers of bacteria compare on the two media after 24 hours.

Explanation / Answer

Hi,

Here is the required c code:

#include<stdio.h>
#include<math.h>

int main() {
int aNumber[9] , bNumber[9];
int j = 0;
for(int i = 0 ; i <= 24 ; i++)
{
if(i%3 == 0)
{
aNumber[j] = pow(2,i);
printf("%d ",aNumber[j]);
j++;
}
}
printf(" ");
j = 0;
for(int i = 0 ; i <= 16 ; i ++)
{
int number = i*1.5;
if(number%3 == 0)
{
bNumber[j] = pow(2,i);
printf("%d ",bNumber[j]);
j++;
}
}
  
}

The algorithm is that the bacteria increase exponantially with time. So, as we require reading only every 3 hours so we get value of exponent of every multiple of 3 for composite A.

and for composite B , we get after every three hours but multiplicaton happen after every 1.5 hours so rounding off to nearest integer and then taking exponent of 2.

The plots are already given in the question. They can be verified with the programs output!

Data table will be received as output.

Thank You and cheers!