true returnsfalse(returnsfalse(was called false when returnstrue(is calledit prints 'returnstrue(was called and then also displays the return value of returnstrue(the same goes for returnsfalse(now try entering the following into the interactive shell returnsfalse(or returnstrue(returnsfalse(was called returnstrue(was called true returnstrue(or returnsfalse(returnstrue(was called true the first part makes sensethe expression returnsfalse(or returnstrue(calls both of the functionsso you see both of the printed messages but the second expression only shows 'returnstrue(was called but not 'returnsfalse(was called this is because python did not call returnsfalse(at all since the left side of the or operator is trueit doesn' matter what returnsfalse(returns and python doesn' bother calling it the evaluation was short-circuited the same applies for the and operator try entering the following into the interactive shellreturnstrue(and returnstrue(returnstrue(was called returnstrue(was called true returnsfalse(and returnsfalse(returnsfalse(was called false if the left side of the and operator is falsethen the entire expression is false it doesn' matter whether the right side of the and operator is true or falseso python doesn' bother evaluating it both false and true and false and false evaluate to falseso python short-circuits the evaluation choosing move from list of moves def chooserandommovefromlist(boardmoveslist) returns valid move from the passed list on the passed board post questions to