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

For each problem, write pseudocode A biological application is used to predict t

ID: 3873289 • Letter: F

Question

For each problem, write pseudocode

A biological application is used to predict the approximate size of a population of organisms. Design the logic for this application such that it:

a) Allows the user to enter

i) The starting number of organisms

ii) The average daily increase in the population (this is a percentage; prompt the user to enter the percentage itself, not a decimal fraction, i.e., if the daily increase is 5%, they should enter simply 5)

iii) The number of days the organisms will be left to multiply

b) Calculates the increased population for each day and outputs both the day number and the population that day, for the entire period that the organisms will be allowed to grow

c) Finally, outputs the overall percentage increase in population from the first day to the last

Explanation / Answer

Pseudocode to predict the approximate size of a population of organisms:

Step 1: Declare three variables as starting_number, average_daily_increase, num_days, day_num, population_that_day & overall_percent_increase with requied data types.

Step 2: Give the instructions for the user to enter the input data as per the program, so that it will avoid the input data conflicts such that average_daily_increase must be an integer value not the fractional value.

Step 3: Input: Get variables values for starting_number, average_daily_increase & num_days.

Step 4: Initialize the population_that_day= starting_number.

Step 5: Calculate the increased population for each day using for loop as:

                Calculations:

                For(int i=0; i< num_days; i++) executes for the given number of days only.

                                day_num= population_that_day* average_daily_increase/100

                                population_that_day= population_that_day+ day_num

                                Output: 1. Display day_num as day number of population.

                                                2. Display population_that_day as population that day.

Step 6: Calculate overall percentage increase in population from first day to last day as:

           Calculations:

          overall_percent_increase = (population_that_day - starting_number)*100/ starting_number.

Step 7: Output: Display overall_percent_increase as overall percentage increase in population from first day to last day.