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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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