Question: Rule of three. Python Programming On the NASA space shuttle, three computers were in use simultaneously. Computations were performed by all three computers, and the

Rule of three. Python Programming

On the NASA space shuttle, three computers were in use simultaneously. Computations were performed 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, then that result was used. But if all computers each provided a different result, then the computation was discarded. Write a function that has three parameters whose values represent three different computational results. If at least two of the inputs are the same, your function should return that value. If all three are different, return the word "ERROR" instead. Write a main() that tests your function extensively.

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!