article

is anyone smiling? 

[WHAT]

  1. [] http://codingbat.com/ - easier coding tests for getting warmed up, some examples below with code
  2. [] the example coded below is in java 

[WHY]

  1. [] practice your coding skills.

[WHERE]

  1. [] We have two monkeys, a and b, and the parameters aSmile and bSmile indicate if each is smiling. We are in trouble if they are both smiling or if neither of them is smiling. Return true if we are in trouble.

[WHEN]

  1. [] 2014-mm-dd
  2. [] 2019-11-25 - updated format

[EXAMPLE]


public boolean monkeyTrouble(boolean aSmile, boolean bSmile) {
 
  if ( aSmile == true && bSmile == true){
     return true;
  }
  
  if ( aSmile == false && bSmile == false){
     return true;
  }

  return false;
 
}

[HOW-TO]

  1. [x] the code in the abov example section will execute in the editor at the source site listed below, it passes all tests

[REFERENCE]

  1. [] http://codingbat.com/prob/p181646 - - included in some 'easier coding tests' for 'getting warmed up' section
Details Photos Edit more

Details

ID: 5765

NAME: code-quiz-question

DESCRIPTION: code-quiz-question - is anyone smiling?

AUTHOR: article.author/s

EDITOR: article.editor/s

PUBLISHER: article.publisher/s

STATUS: Write

PRIORITY: -5

OWNER ID: 75

Content Photos Edit more

photos

page_photo

actions

Email Email-Owner SMS and