subject

Write a program that will predict the size of a population of organisms. the program should ask the user for the starting number of organisms, their average daily population increase (as a percentage, expressed as a fraction in decimal form: for example 0.052 would mean a 5.2% increase each day), and the number of days they will multiply. a loop should display the size of the population for each day.

prompts, output labels and messages. the three input data should be prompted for with the following prompts: "enter the starting number of organisms: ", "enter the average daily population increase (as a percentage): , and "enter the number of days they will multiply: " respectively. the population sizes displayed should appear on separate lines, each of the form "on day d the population size was p." where d is the day number (starting with 1) and p is the population you calculated for that day.

input validation. do not accept a number less than 2 for the starting size of the population. if the user fails to satisfy this print a line with this message "the starting number of organisms must be at least 2.", display the prompt again and try to read the value. similarly, do not accept a negative number for average daily population increase, using the message "the average daily population increase must be a positive value." and retrying. finally, do not accept a number less than 1 for the number of days they will multiply and use the message "the number of days must be at least 1."

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 14:00
Which database model is best used for data warehouse and data mining
Answers: 3
question
Computers and Technology, 23.06.2019 16:30
Which of the following is not an enhancement to the standard wiki to make it more attractive for corporations? encryptionwork spacespermission toolspredictive text
Answers: 2
question
Computers and Technology, 24.06.2019 05:30
Hey i really need some solving this problem: 1. encrypt this binary string into cipher text: 110000. include in your answer the formula the decoder would use to decrypt your cipher text in the format (coded answer) x n mod (m) = y & 2. decrypt this cipher text into a binary string: 106 you.
Answers: 2
question
Computers and Technology, 25.06.2019 07:30
In a single day more than blank people's lives are affected simply by driving a motor vehicle
Answers: 1
You know the right answer?
Write a program that will predict the size of a population of organisms. the program should ask the...
Questions
question
English, 13.09.2020 14:01
question
Mathematics, 13.09.2020 14:01
question
Biology, 13.09.2020 14:01
question
History, 13.09.2020 14:01
question
Mathematics, 13.09.2020 14:01
question
Mathematics, 13.09.2020 14:01
question
Social Studies, 13.09.2020 14:01
question
Mathematics, 13.09.2020 14:01
question
Mathematics, 13.09.2020 14:01
question
Mathematics, 13.09.2020 14:01
question
Mathematics, 13.09.2020 14:01
question
Mathematics, 13.09.2020 14:01
question
Geography, 13.09.2020 14:01
question
Mathematics, 13.09.2020 14:01
question
Mathematics, 13.09.2020 14:01
question
Mathematics, 13.09.2020 14:01
question
English, 13.09.2020 14:01
question
Mathematics, 13.09.2020 14:01
question
Mathematics, 13.09.2020 14:01
question
Mathematics, 13.09.2020 14:01
Questions on the website: 13722361