1 Overview A group of chimpanzees at Gotham Zoo are given a series of tasks to...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1 Overview A group of chimpanzees at Gotham Zoo are given a series of tasks to perform every morning to test their mood and abilities to do work. There are 2 rooms (call them room A and room B) open to them each containing 4 tasks; the chimps learn that they immediately get a special treat when they complete any 5 tasks total out of both rooms. So each day they get to choose which tasks that they wish to complete. For each task that they successfully attempt a computer records their success in completing the task as a integer score in the range of 1-50 (inclusive). Unattempted tasks are indicated with a score of 0, and a negative score indicates a data error that usually indicates the chimp abused the equipment. Any trials with negative individual scores or no attempts are not counted in the overall statistics. Also if more tasks than required are completed, then the first ones completed in order are counted and the later ones are disregarded. Write a C program to read in each chimp's id number (a 4 digit value) followed by 8 scores (with each score being in the range 0-50 inclusive). An id number of 0 indicates the end of input. The data collection computer guarantees that the correct number of input values are always recorded and that the end-of-data is always indicated with a 0 for the id. Here is some sample input data: 2199 20 0 0 20 0 20 20 20 7001 0 0 0 0 0 0 0 0 7012 0 20 0 0 0 0 20 20 4000 -1-1-1 -1 -1 -1 -1 -1 1422 20 0 18 20 0 20 19 20 1372 -1 -1 18 11 0 20 0 20 0 Input to your program must come from standard input via redirection on the command line (as discussed in class; see the sample run below). You will echo print each student's id and scores along with printing out their result and all appropriate comments; do this in the table format shown in the sample run. Output, including all labels and spacings, must appear exactly as it appears in the sample run below. Depending on the data entered your program should also print out one of the following comments where appropriate (where n is the number of valid trials): Invalid trial. No attempts. 1 Overview A group of chimpanzees at Gotham Zoo are given a series of tasks to perform every morning to test their mood and abilities to do work. There are 2 rooms (call them room A and room B) open to them each containing 4 tasks; the chimps learn that they immediately get a special treat when they complete any 5 tasks total out of both rooms. So each day they get to choose which tasks that they wish to complete. For each task that they successfully attempt a computer records their success in completing the task as a integer score in the range of 1-50 (inclusive). Unattempted tasks are indicated with a score of 0, and a negative score indicates a data error that usually indicates the chimp abused the equipment. Any trials with negative individual scores or no attempts are not counted in the overall statistics. Also if more tasks than required are completed, then the first ones completed in order are counted and the later ones are disregarded. Write a C program to read in each chimp's id number (a 4 digit value) followed by 8 scores (with each score being in the range 0-50 inclusive). An id number of 0 indicates the end of input. The data collection computer guarantees that the correct number of input values are always recorded and that the end-of-data is always indicated with a 0 for the id. Here is some sample input data: 2199 20 0 0 20 0 20 20 20 7001 0 0 0 0 0 0 0 0 7012 0 20 0 0 0 0 20 20 4000 -1-1-1 -1 -1 -1 -1 -1 1422 20 0 18 20 0 20 19 20 1372 -1 -1 18 11 0 20 0 20 0 Input to your program must come from standard input via redirection on the command line (as discussed in class; see the sample run below). You will echo print each student's id and scores along with printing out their result and all appropriate comments; do this in the table format shown in the sample run. Output, including all labels and spacings, must appear exactly as it appears in the sample run below. Depending on the data entered your program should also print out one of the following comments where appropriate (where n is the number of valid trials): Invalid trial. No attempts.
Expert Answer:
Answer rating: 100% (QA)
Based on the provided context here is a C program that reads in each chimpanzees ID ... View the full answer
Related Book For
Smith and Roberson Business Law
ISBN: 978-0538473637
15th Edition
Authors: Richard A. Mann, Barry S. Roberts
Posted Date:
Students also viewed these programming questions
-
If a brand intentionally engages in greenwashing and is called out for its duplicity, is an apology enough? If yes, why is it enough and should we then trust that the brand will act with integrity...
-
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...
-
Case Study: Quick Fix Dental Practice Technology requirements Application must be built using Visual Studio 2019 or Visual Studio 2017, professional or enterprise. The community edition is not...
-
Which type of philosophical reasoning begins with one example and varies it to see how dramatic the change is, which uncovers its most crucial characteristics?
-
If you notice the interference patterns of a thin film of oil or gasoline on water, you'll see that the colors form complete rings. How are these rings similar to the lines of equal elevation on a...
-
Write a sales message to Better Horizons members to promote the new rewards programs. Feel free to add additional details (i.e., types of rewards). Christine Russo works at Better Horizons and is...
-
\(\mu=150, \sigma=25, n=49\) In Exercises 1-4, a population has a mean \(\mu\) and a standard deviation \(\sigma\). Find the mean and standard deviation of the sampling distribution of sample means...
-
The number of heart surgeries performed at Hartville General Hospital has increased steadily over the past several years. The hospitals administration is seeking the best method to forecast the...
-
7 Exercise 7-2 (Algo) First Stage Allocation [LO7-2] SecuriCorp operates a fleet of armored cars that make scheduled pickups and deliveries in the Los Angeles area. The company is implementing an...
-
Larry Power started a new business in the name of Power Electrical on October 1, 2020. During October, a number of activities occurred and the following totals resulted at October 31, 2020 (shown in...
-
Refer to the recent financial statement excerpts of the Carb O' Nation Company (the Company) that follow and answer the following questions. Excerpts from the Carb O' Nation Company Consolidated Year...
-
why is it important to seek and evaluate the success of a menu and individual menu items?
-
Ten years ago, Mobiletex Ltd. Leased a patent for the manufacture of a gadget used in mobile phones from Quickcom Ltd. The lease agreement provided for payment of royalty at the rate of Sh.70 per...
-
Define Management Accounting and the components of the Manufacturing Statement.
-
A woman invests $6400 in an account that pays 6% interest per year, compounded continuously. (a) What is the amount after 2 years? (Round your answer to the nearest cent.) $ 7215.98 (b) How long will...
-
How do you pass a file name as an argument in python? What is the built in input function in python? Assist me in writing a small function named punctuate that takes an input parameter named txt ,...
-
Saleh is married (spouse does not work), claims two dependents who are under the age of 17. What is the amount of federal income tax withholding under the following conditions? Assume Saleh has only...
-
A horizontal annulus with inside and outside diameters of 8 and 10 cm, respectively, contains liquid water. The inside and outside surfaces are maintained at 40 and 20oC, respectively. Calculate the...
-
On June 15, a newspaper columnist predicted that the coast of State X would be flooded on the following September 1. Relying on this pronouncement, Gullible quit his job and sold his property at a...
-
In February, Brady contracted to construct a house for Fulghum for $106,850. Brady began construction on March 13. Neither during the negotiation of this contract nor when he began performance was...
-
A statute requires all vessels traveling on the Great Lakes to provide lifeboats. One of Winston Steamship Companys boats is sent out of port without a lifeboat. Perry, a sailor, falls overboard in a...
-
The following information for Great Oaks Furniture, a retail furniture and design firm, relates to Exercises 6 through 11. Calculate earnings per share, the price-eam-m'ssmjngs ratio, the gross...
-
The following information for Great Oaks Furniture, a retail furniture and design firm, relates to Exercises 6 through 11. Perform a vertical analysis of the balance sheets and income statements for...
-
The following information for Great Oaks Furniture, a retail furniture and design firm, relates to Exercises 6 through 11. Calculate asset turnover, accounts receivable turnover, days sales in...
Study smarter with the SolutionInn App