Question: Write a function that takes, as arguments, two objects, value1and value2. If value1 and value2 are either non-negative integers or strings containing only digits, cast
Write a function that takes, as arguments, two objects, value1and value2. If value1 and value2 are either non-negative integers or strings containing only digits, cast value1and value2 to integers and compute their average. If their average is greater than 50, return the string Above 50 and if the average is less than 50, return the string Below 50. If the average is equal to 50, return the string Equal to 50, and if value1or value2 are not integers or strings containing only digits, return the string Invalid Input. Name this function compareToFifty(value1, value2).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
