monkey_trouble¶
We have two monkeys, a and b. First ask the user if monkey a
is smiling, then ask the user if monkey b
is smiling. We are in trouble if they are both smiling or if neither of them is smiling. Output a message to the user telling them if we are in trouble. For the test cases below, False
means “no” and True
means “yes”.
This exercise was taken from codingbat.com and has been adapted for the Python language. There are many great programming exercises there, but the majority are created for Java.