Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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".
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
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started