Question: 4. Function Two: voteComp Specification: On the NASA Space Shuttle, three computers were in use simultaneously. Computations were per-formed by all three computers, and the

4. Function Two: voteComp Specification: On the NASA Space Shuttle, three computers4. Function Two: voteComp Specification: On the NASA Space Shuttle, three computers were in use simultaneously. Computations were per-formed by all three computers, and the result of each computation was put to a vote. If at least two of the computers provided the same result, that result was then used. But if all three computers each pro-vided a different result, then the computation was discarded. The second function you will write should be called voteComp. This function should take three input variables. The three variables will all be integers and will represent the outputs of each of the three computers. As output, the function should return either a number or string. If at least two of the input integers are the same, the function should return that integer. If all three values are different, the function should return the string ERROR. Watch the capitalization and spelling as always. Testing: voteComp(34, 45, 34) Should return: 34

4. Function Two: voteComp Specification: On the NASA Space Shuttle, three computers were in use simultaneously. Computations were per-formed by all three computers, and the result of each computation was put to a vote. If at least two of the computers provided the same result, that result was then used. But if all three computers each pro-vided a different result, then the computation was discarded Page 3 of 4 CS 105-Intro to Computing Non-Tech Fall 2017 The second function you will write should be called voteComp. This function should take three input variables. The three variables will all be integers and will represent the outputs of each of the three computers. As output, the function should return either a number or string. If at least two of the input integers are the same, the function should return that integer. If all three values are different, the function should return the string ERROR. Watch the capitalization and spelling as always. Testing: voteComp (34, 45, 34) Should return 34

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!