Write a program that predicts the approximate size of a population of organisms. The ap- plication...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 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
Expert Answer:
Related Book For
Starting Out With Java From Control Structures Through Data Structures
ISBN: 9780133957051
6th Edition
Authors: Tony Gaddis
Posted Date:
Students also viewed these programming questions
-
James Morgan is an entrepreneur who established an IT software business in cloud computing named Arista Networks Ltd (Arista Networks) in West Perth, Western Australia. Arista Networks daily...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Alpha Company used the periodic inventory system for purchase & sales of merchandise. Discount terms for both purchase & sales are, FOB Destination, 2/10, n30 and the gross method is used. > Alpha...
-
A company reports the following: Net income ............. $115,000 Preferred dividends .......... $15,000 Shares of common stock outstanding ... 20,000 Market price per share of common stock . $65.00...
-
When the 1HNMR spectrum of an alcohol is run in dimethyl sulfoxide (DMSO) solvent rather than in chloroform, exchange of the OH proton is slow and spinspin splitting is seen between the OH proton...
-
Use the Gram-Schmidt process to construct an orthonormal basis for R4 starting with the following sets of vectors: (a) (1, 0, 1,0)T, (0,1,0, - 1)T, (1,0,0,1)T, (1, 1,1, l)T (b) (1,0,0, l)T, (4, 1,0,...
-
A solid conducting sphere of radius \(R\) is embedded in an electrically neutral nonconducting spherical shell that has inner radius \(R\), has outer radius \(2 R\), and is made of a material having...
-
In alphabetical order below are current asset items for Ruiz Companys balance sheet at December 31, 2014. Prepare the current assets section (including a complete heading). Accounts receivable...
-
6. An igloo, a hemispherical enclosure built of ice (1.67 J/m-sC), has as inner radius of 2.50m. The thickness of the ice is 0.5m. At what rate must thermal energy be generated to maintain the air...
-
Apperson and Fitz is a chain of clothing stores that caters to high school and college students. It publishes a quarterly catalogue and operates a Web site that features provocatively attired males...
-
What's a piston? options: Metal wire that carriers an electric charge for the spark plug Cylindrical piece of metal that moves up and down using the energy supplied by the combustion process Valve...
-
What are the provisions of the Insurance Act, 1938 regarding submission of reports and returns by the insurance companies?
-
Describe the main features of public sector undertaking, which affect its audit.
-
Draft an audit programme for examining the accounts of either a hotel or a cinema hall.
-
What do you mean by human resource audit?
-
Define government company. How is the auditor of a government company appointed and removed? What are the powers and duties of the auditor?
-
You are interested in whether students prefer the foodfrom the marketplace at Brown or the dining hall at Westbrook.You give 120 students the choice between a $25 gift card to eitherplace and record...
-
What tools are available to help shoppers compare prices, features, and values and check other shoppers opinions?
-
Describe what the phrase self-documenting program means.
-
Look at the following method header. What type of value does the method return? Public static double getValue(int a, float b, String c)
-
Write a program that will predict the size of a population of organisms. The program should ask for the starting number of organisms, their average daily population increase (as a percentage), and...
-
A professional baseball team set its sights on winning the World Series. The team owner wanted to win big and win fast. Consequently, the team sank all of its resources into trading for the best...
-
Immediately following World War II, the quality of products produced by Japanese companies was not good enough to compete in the international marketplace. The only advantage Japanese companies had...
-
Two quality managers meet for lunch every Friday to discuss common problems, compare notes, and make suggestions to each other. Today their discussion has turned into a debate. The topic is the...
Study smarter with the SolutionInn App