Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program that predicts the approximate size of a population of organisms. The ap- plication should allow the user to enter the starting
Write a program that predicts the approximate size of a population of organisms. The ap- plication should allow the user to enter the starting number of organisms, the average daily population increase (as a percentage), and the number of days the organisms will be left to multiply. Mathematically, the population for any day n > 0 can be expressed as Pop, Pop-1 (1+ percent increase 100 Test your program with the data in Table 1. Finally, format your program to match the sample terminal. Your output should exactly match the sample output, character for charac- ter, including all white space and punctuation. User input in the sample has been highlighted in Pappy's Purple to distinguish it from the program's output, but your user input does not need to be colored. Save your program as organisms_login.py, where login is your Purdue login. Then submit it along with a screenshot showing a run of the test case. Input Start Rate Days Day 2.5 98 15 0 1 2 3 4 5 Output 6 7 8 9 Pop. 38.424 76.079 150.637 298.261 590.557 1.169.302 2,315.218 10 11 4,584.132 12 9,076.581 13 17,971.631 14 15 2.500 4.950 9.801 19.406 Table 1: Population test data. 35, 583.828 70, 455.980 Terminal $ python organisms_login.py Starting population, in thousands: 2.5 Average daily increase, in percent: 98 Number of days to multiply: 15 Approx. Pop Day 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2.500 4.950 9.801 19.406 38.424 76.079 150.637 298.261 590.557 1,169.302 2,315.218 4,584.132 9,076.581 17,971.631 35,583.828 70,455.980
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started