Question: Write a complete program that will predict the size of a pod of brine shrimp. The program should ask the user for a starting size

 Write a complete program that will predict the size of a

Write a complete program that will predict the size of a pod of brine shrimp. The program should ask the user for a starting size of the brine shrimp pod, their average daily growth increase (as a percentage of current size). For instance, if the growth rate is 10% of the current size, then the user would enter 0.10 as that input value. The program also needs to ask the user for the number of days the brine shrimp will grow. Use loops to validate the user input. A loop should display the size of the pod for EACH day, not just a final number of shrimp at the end. Daily ending populations must be displayed with two decimal levels of precision (The pod size for shrimp should be a decimal value so DO NOT assign the integer data type to your population variable (s)) An example of the output might look like (assuming a starting pod size of 10 at the beginning of dayl and a growth rate of 10% (0.10), for four days): Day: Size of Shrimp pod (End of day): 123411.0012.1013.3114.64 Total Shrimp pod size at the end of Day 4 is: 14.64 Input Validation: The program should not accept a number less than 2 for the starting pod size of brine shrimp, nor a negative number for average daily growth rate increase, nor a number less than 1 for the number of days the shrimp will grow. Continue asking the user for valid values so long as they continue to enter an erroneous piece of input

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!