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?
-
A small step in the potential energy is introduced into the one-dimensional square-well problem as in Fig. 9.45. (a) Write a general expression for the first -order correction to the ground-state...
-
The owner of a medium-sized home-building center specializing in custom-designed and do-it-yourself bathroom supplies requested the Tom Jones Consulting Firm to prepare a report on the customer...
-
The figure below shows a nozzle vane and a rotor blade for an axial flow gas turbine stage. The blade speed is \(800 \mathrm{ft} / \mathrm{s}\). The absolute velocity leaving the stage is identical...
-
Selected account balances for R. Tam Company at January 1, 2012, are presented below. Accounts Payable $14,000 Accounts Receivable 22,000 Cash 17,000 Inventory 13,500 R. Tams sales journal for...
-
Galileo dropped two balls from the Leaning Tower of Pisa. The tower is about 56 m tall. For the questions below, assume the mass of one of the balls is 10 kg and the mass of the second ball is 18 kg....
-
(a) Sketch the trapezoidal spectrum (b) By appropriate sketches, show that it satisfies Nyquists pulse-shaping criterion. P(f) =A(f /b) A(F/a), b > a > 0, for a =1 and b = 2. %| b-a b-a
-
Pare in the Glass Company (Pane) is a glass manufacturer based out of California. They produce a number of glass products including car windows and windshields, windows for houses, stained glass...
-
Find all solutions of the equation algebraically. Check your solutions. (Enter your answers as a comma-separated list.) 121+ 118t2 - 3 = 0 X =
-
On 1 July 20X0, QR acquired 70% of the equity shares in ZX. For the year ended 31 December 20X0, administrative expenses of QR and ZX were $365,000 and $140,000 respectively. QR elected to measure...
-
Find all real zeros of the function. f(x)=5(x-1)(x+49)(x+6)2 If there is more than one answer, separate them with commas.
-
Builtrite is considering purchasing a new machine that would cost $70,000 and the machine would be depreciated (straight line) down to $0 over its five year life. Due to machine efficiencies, an...
-
Aloha company CEO wants to assess if he will approve the project by comparing the WACC and the projects rate of return Project rate of return based on proposal is 11% Aloha Co. needs to raise capital...
-
Write the common names for the amines shown below. HC-N-CH, CH3 H h-ethylmethylamine HC-CH,-NCH,CH3 H -ethylpropylamine Incorrect. First name the alkyl groups. Keep in mind that the term methyl...
-
(a) What do data breach notification laws require? (b) Why has this caused companies to think more about security?
-
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...
-
Maribel Ortiz is puzzled. Her company had a profit margin of 10% in 2025. She feels that this is an indication that the company is doing well. Gordon Liddy, her accountant, says that more information...
-
At December 31, 2025, the fair value of non-trading securities is 41,300 and the cost is 39,800. At January 1, 2025, there was a credit balance of 900 in the Fair Value Adjustment Non-Trading...
-
On January 1, 2025, Lennon Enterprises acquires 100% of Ono Ltd. for 220,000 in cash. The condensed statements of financial position of the two companies immediately following the acquisition are as...
Study smarter with the SolutionInn App