Predict the size of a population of organisms

Assignment Help Computer Engineering
Reference no: EM132210529

Question :

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, and the number of days they will multiply.

For example, a population might begin with two organisms, have a daily average increase of 50 percent, and will be allowed to multiply for seven days. The program should use a loop to display the size of the population for each day.

Input Validation: Do not accept a number less than 2 for the starting size of the population. Do not accept a negative number for average daily population increase. Do not accept a number less than 1 for the number of days they will multiply.

You should get something like the following when you run this program:

User Prompts: (User input in bold)

Enter the starting number of organisms: 2

Enter the daily increase: .50

Enter the number of days the organisms will multiply: 7

Program Output:

Day Organisms

1 2.0

2 3.0

3 4.5

4 6.75

5 10.125

6 15.1875

7 22.78125

Modify the program you just wrote so it writes the output to a file instead of the computer screen.

The number of organisms in this version of the program should be a real number rounded to two significant figures after the decimal point.

Open your output text file with Notepad or another text editor to confirm the output.

Reference no: EM132210529

Questions Cloud

Predict the size of a population of organisms : The program should ask for the starting number of organisms, their average daily population increase, and the number of days they will multiply.
Prepare a consolidation worksheet : prepare a consolidation worksheet for 20X9 assuming that Big Co. uses the modified equity method to account for its investment in Old Company
What is the reward to volatility ratio of the feasible CAL : A pension fund manager is considering two mutual funds. What is the reward to volatility ratio of the feasible CAL
Write a program that prints the day number of the year : Write a program that prints the day number of the year, given the date in the form month-day-year.
Predict the size of a population of organisms : The program should ask for the starting number of organisms, their average daily population increase, and the number of days they will multiply.
Write a program that prompts and reads in two inputs : Write a program that prompts and reads in two inputs, the unit price of an item and the quantity of items purchased.
What is the NPV of investment from the parents perspective : Expected inflation is 5.0% in the Indian rupee and 2.0% in the Japanese yen. What is the NPV of the investment from the parent's perspective
What strategies have been used : ITECH1101 IT Problem Solving - improving our understanding of critical thinking, with a focus on computational thinking since this subset of critical thinking
Write a program to process a weighted undirected graph : Set up and print the adjacency matrix representation of the Graph. Determine whether the graph is connected.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Write down a program to request a person''s age

In order for exercise to be beneficial to cardiovascular system, heart rate (number of heart beats per minute) must exceed a value called the training heart rate.

  How could usability be determined

Locate two Web sites that you feel exhibit exemplary design features. define why you selected each site. What design features stand out on each site? Are these features unique to the Web sites you selected or are they used by their competitors or s..

  Design a logical and physical topographical layout

Design a logical and physical topographical layout of the current and planned network through the use of graphical tools in Microsoft Word or Visio, or an open source alternative such as Dia.

  Question1 define defense in depth and explain the different

question1. define defense in depth and explain the different layers.2. what is leading security principle in

  Which calculation provides more security

Which calculation provides more security? Which calculation is more efficient in terms of space and time?

  Create a form using while and for loop with textbox

Create a form using While and For loop with textbox to enter loan amount, term of the loan in year, starting annual rate, ending annual rate and rate step value

  List the binary address and the tag

For each reference, list the binary address, the tag, the index, and if the reference is a hit or a miss, assuming the cache is initially empty.

  What situations would not warrant the use of an array

What situations would not warrant the use of an array? Provide an example showing why. Research the concept of C++ vectors.

  Write a program in java to count the occurrences of word

Write a program in Java to count the occurrences of each word in a large text file (like a book)

  Describe the logical characteristics of each interface

Describe the logical characteristics of each interface between the software product and the users.

  What is the buffer explain briefly

Assume that ASC memory is built using eight interleaved blocks of 8 Kwords each. Include an instruction buffer eight words long into the ASC control unit.

  Why data structure you use gives a good tradeoff

Suppose we want to create an address book which contains names, phone numbers, emails, and other personal information.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd