Question: function triangleAnalyzer ( angleA , angleB, angleC ) { / / triangleAnalyzer takes three arguments named angleA, angleB, and angleC: / / * If any
function triangleAnalyzerangleA angleB, angleC
triangleAnalyzer takes three arguments named angleA, angleB, and angleC:
If any angle is degrees, return the string "this is a right triangle"
If any angle is over degrees, return the string "this is an obtuse triangle"
If all angles are under degrees, return the string "this is an acute triangle"
Other conditions that must be met:
All angles must be of type number. If not, return the string "all angles must be numbers"
All angles must be greater than zero. If not, return the string "all angles must be greater than zero"
The three angles must add up to If not, return the string "angles must total
Hint: the order of the conditions in the pseudocode above and in the actual code is not necessarily the same
Hint: It's advised to deal with the other conditions first, like arguments being of the wrong type.
In the real world, these are considered "edge cases".
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
