edit-article
Home
Up
Delete
Article Name:
Article Description:
code-quiz-question - is anyone smiling?
Chapter ID/Name:
Status:
Write
Writing
Written
Add Photo:
Owner ID:
Content:
use HTML
Edit Content
<h1 style="text-align: center;">is anyone smiling? </h1> <h2>[WHAT]</h2> <ol> <li>[] <a href="http://codingbat.com/" target="_blank">http://codingbat.com/</a> - easier coding tests for getting warmed up, some examples below with code</li> <li>[] the example coded below is in java </li> </ol> <h2>[WHY]</h2> <ol> <li>[] practice your coding skills.</li> </ol> <h2>[WHERE]</h2> <ol> <li>[] 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.</li> </ol> <h2>[WHEN]</h2> <ol> <li>[] 2014-mm-dd</li> <li>[] 2019-11-25 - updated format</li> </ol> <h2>[EXAMPLE]</h2> <p><br /><span style="font-size: medium;">public boolean monkeyTrouble(boolean aSmile, boolean bSmile) {</span><br /> <br /><span style="font-size: medium;"> if ( aSmile == true && bSmile == true){</span><br /><span style="font-size: medium;"> return true;</span><br /><span style="font-size: medium;"> }</span><br /> <br /><span style="font-size: medium;"> if ( aSmile == false && bSmile == false){</span><br /><span style="font-size: medium;"> return true;</span><br /><span style="font-size: medium;"> }</span></p> <p><span style="font-size: medium;"> return false;</span><br /> <br /><span style="font-size: medium;">}</span></p> <h2>[HOW-TO]</h2> <ol> <li> <h2><span style="display: inline !important; float: none; background-color: #ffffff; color: #000000; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;">[x] the code in the abov example section will execute in the editor at the source site listed below, it passes all tests</span></h2> </li> </ol> <h2>[REFERENCE]</h2> <ol> <li>[] http://codingbat.com/prob/p181646 - <span style="display: inline !important; float: none; background-color: #ffffff; color: #000000; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;">- included in some 'easier coding tests' for 'getting warmed up' section</span><strong></strong><em></em></li> </ol>