Question: / * * * Introduction to Computing: A Net - centric Approach = = = EECS Fall 2 0 2 4 = = = Lassonde
Introduction to Computing: A Netcentric Approach EECS Fall Lassonde School of Engineering Module Description In this module we write some simple functions in that illustrate basic logical operations and the use of selection statements if and switch An Example function! Return a string that says hello. @return string the string 'hello'. function hello return 'hello'; Test to see if a b and c are all equal in value @return boolean true if all equal, else false function allEqual a b c write your code here! Returns a number between and representing the roll of a loaded die. The probability of rolling a is The probability of rolling a is The probability of rolling a is The probability of rolling a is The probability of rolling a is The probability of rolling a is @return number a number between and function rollLoadedDie write your code here! Returns a string indicating the most likely animal, given the inputs. Returns the string "It's a cat" if hasFourLegs and climbsTrees are both true. Returns the string "It's a snake" if hasFourLegs is not true but climbsTrees is Returns the string "It's a dog" if hasFourLegs is true but climbsTrees is not. Returns the string "It's a fish" if hasFourLegs and climbsTrees are both false. @param boolean hasFourLegs true if has four legs, else false @param boolean climbsTrees true if climbs rrees, else false @return string a string with a guess as to the animal function guessAnimal hasFourLegsclimbsTrees write your code here! Returns a string indicating the name of the month, given a number between and Returns the string "January" the input is Returns the string "February" the input is and so on Returns the string "Error" if the input is not a number or not in the range between and @param number num the number of the month @return string a string with the name of the month function month num write your code here! Returns a boolean indicating if the input year is a leap year. All leap years are divisible by however No leap years are divisible by unless they are also divisible by @param number year the year to test @return boolean true, if is leap year, else false function isLeapYear year write your code here! Returns a boolean indicating if the input character is a vowel @param string character a character to test @return boolean true, if input is a vowel upper or lower case; else false. function isVowel character write your code here! DO NOT CHANGE THE LINE THAT IS BELOW. To run at the command line ie to run node "labjs comment out this line To run the test file ie to run "vitest run lab this line must be included export hello, guessAnimal, month, isVowel, isLeapYear, allEqual, rollLoadedDie
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
