A program to predict the size of a population of organisms

Assignment Help Computer Engineering
Reference no: EM132211124

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: EM132211124

Questions Cloud

Choose two different internetworking devices : Choose two different internetworking devices from this list.
Explain the potential impact of white privilege on clients : Explain the potential impact of white privilege on clients from both dominant and minority groups (consider impact of both positive and negative stereotypes).
What areas could still be developed : What do you think are the most persuasive elements of your presentation? What areas could still be developed?
Briefly explain why you selected each question for survey : Create a 10-item, open-ended question survey that you could use to determine the needs for a well-being program for the staff.
A program to 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.
Pseudocode or very detailed instructions : In your favorite language, pseudocode or very detailed instructions, provide a Wgram that will take an infinite amount of inputs and output
How might the team explore what problems bring the clients : How might the team explore what problems bring the clients to their agency? What might the team learn from client assessments? How can the team verify.
Write a program to play a numbers guessing game : The user thinks of a number between 1 and 100 and your program asks questions to figure out what the number is.
Detect and remove the threat : Your system has been compromised. what would you to detect and remove the threat. This is a zero day attack, so there is no "commercial" solution

Reviews

Write a Review

Computer Engineering Questions & Answers

  Prepare a schematic design of five-stage multiply pipeline

Prepare a schematic design of the five-stage multiply pipeline. All line widths and inter-stage connections must be shown.

  What fields you believe would be primary keys

Be sure to include the field type and size. Please do not jump ahead and try to create tables. now I'm just looking for a list of fields. This is somewhat vague on purpose. I want you to decide what is required in the database.

  Developing programs via functional decomposition and pointer

CSCI251/851 Advanced Programming Developing programs via functional decomposition and pointers.On completion you should know how to design a program by decomposing the problem into small functional units - You are provided with an incomplete database..

  Sha-256 and rc4

SHA-256 (with 256-bit output) is more resistant to the attacks based on birthday paradox than SHA-1. Key reuse is deadly for the stream ciphers such as RC4.

  Distinguish software needs versus software wants

Search the internet for tips on how to distinguish software needs versus software wants. From your research, summarize 3 of most common tips.

  Write the specifications for this function

Write a paragraph comparing the client function and the member function for the same task.

  Determine a persons intoxicated condition when operating

In your opinion should the legally intoxicated percentage be lowered or raised to determine a persons intoxicated condition when operating a motor vehicle?

  Write an application that can be used to count the frequency

Write an application that can be used to count the frequency of characters in a paragraph. Allow the user to input several sentences using a GUI.

  Assess security-privacy concerns in applications

Do you feel that the STRIDE model, which is discussed extensively in this course, is a good baseline to help assess security/privacy concerns in applications.

  What is the cost in terms of number of seeks

How many blocks of memory are required to achieve this cost in the best case senarous?

  Discuss your experiences with bluetooth hacking

Discuss how they would envision the devices that they own working together and how that might be done in a secure manner.

  Creates an array of hundred double values

Creates an array of 100 double values. Using a loop, assigns a random value, between 0.0 and 1.0, to each element of the array.

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