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
Anton [14]
3 years ago
6

For example, one might start with a population of 500 organisms, a growth rate of 2, and a growth period to achieve this rate of

6 hours. Assuming that none of the organisms die, this would imply that this population would double in size every 6 hours. Thus, after allowing 6 hours for growth, we would have 1000 organisms, and after 12 hours, we would have 2000 organisms.Write a program that takes these inputs and displays a prediction of the total population.An example of the program input and output is shown below:Enter the initial number of organisms: 10Enter the rate of growth [a real number > 0]: 2Enter the number of hours to achieve the rate of growth: 2Enter the total hours of growth: 6The total population is 80
Computers and Technology
1 answer:
maks197457 [2]3 years ago
6 0

Answer:

The Python code is given below with appropriate comments

Explanation:

def predict_population_growth():

#Prompt and read the input from the user

num_org = int(input("Enter the initial number of organisms: "))

GR = float(input("Enter the rate of growth [a real number > 0]: "))

numHour = int(input("Enter the number of hours to achieve the rate of growth: "))

totalHours = int(input("Enter the total hours of growth: "))

#caluclate the total poulation growth

population = num_org

hours = 0

while hours < totalHours:

    population *= GR

    hours += numHour

print(" The total population is " + str(int(population)))

predict_population_growth()

You might be interested in
Does nest cam outdoor connect to a security camera prewire
yawa3891 [41]
Answer: hi there! Have a good day/night :))
6 0
3 years ago
What are the six peripherals of a computer system
Lubov Fominskaja [6]
Peripherals fall into three categories:
1. input devices are devices that put commands inside computers such as keyboards, mouses, and joysticks but the first two are the mostly used nowadays
2. output devices are what computers give out such as monitors, printers, speakers and I think projectors also fall into that category
3.storage devices such as a optical drive, hard drive, SDD, flash drive
So the main ones might be a mouse, keyboard, monitors, I think printers, hard drives and flash drives but speakers might be considered as one instead of a flash drive.

4 0
3 years ago
A social media site violates its terms of service by selling information about its users
balu736 [363]
A company violating its terms of service by selling their user’s info is a violation of Digital Privacy
4 0
3 years ago
Give three reasons why resistors are important in a circuit.​
Zolol [24]
To reduce current flow
To adjust signal levels
To divide voltages
5 0
1 year ago
Think of all your favorite movies or games. Is their digital animation present? How do you think that it affected the movie or g
Mademuasel [1]
A ........................
7 0
3 years ago
Read 2 more answers
Other questions:
  • . SQL is a(n) _____ language.
    8·1 answer
  • In each iteration, selection sort (small) places which element in the correct location?
    9·1 answer
  • What are the features of a strong résumé? Check all that apply. The résumé is printed on regular printer paper. The résumé is we
    5·2 answers
  • When did gaming become a thing?
    7·2 answers
  • Which of the following is not a hazard a driver might encounter?
    5·1 answer
  • . Two blue armies are each poised on opposite hills preparing to attack a single red army in the valley. The red army can defeat
    5·1 answer
  • <img src="https://tex.z-dn.net/?f=%28a%20%2B%20b%29%20%20%7B2%7D" id="TexFormula1" title="(a + b) {2}" alt="(a + b) {2}" align
    15·1 answer
  • Which statement is true about encoding in Python?
    7·1 answer
  • How to realize dynamic balance of planar closed-chain leg mechanism?​
    7·2 answers
  • which of the following is the most appropriate way to write css style for the font family property in html
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!