Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

function triangleAnalyzer ( angleA , angleB, angleC ) { / / triangleAnalyzer takes three arguments named angleA, angleB, and angleC: / / * If any

function triangleAnalyzer(angleA, angleB, angleC){
// triangleAnalyzer takes three arguments named angleA, angleB, and angleC:
//* If any angle is 90 degrees, return the string "this is a right triangle"
//* If any angle is over 90 degrees, return the string "this is an obtuse triangle"
//* If all angles are under 90 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 180. If not, return the string "angles must total 180"
// Hint: the order of the conditions in the pseudo-code 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

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Define Management or What is Management?

Answered: 1 week ago

Question

What do you understand by MBO?

Answered: 1 week ago