Question: Problem 4 Write code using a for-loop to predict the size of a population. Parameters are the starting number of organisms, the daily population increase

 Problem 4 Write code using a for-loop to predict the size

Problem 4 Write code using a for-loop to predict the size of a population. Parameters are the starting number of organisms, the daily population increase as a percentage), and the number of days the organisms will be left to multiply. Prompt the user to enter these three parameters, then print the predicted population size. Population size should be an integer (rounded or truncated). Example 1: Starting number of organisms: 2 daily increase: 30% number of days: 10 on day 10, the population is 21. Example 2: Starting number of organisms: 4 daily increase: 12% number of days: 12 on day 12, the population is 18. Example 3: Starting number of organisms: 45 daily increase: 0.75% number of days: 20 on day 20, the population is ??? The first 3 lines are from input. The final is printed after the calculation

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!