the bool(function the bool(is similar to the int(and str(functions it returns the boolean value form of the value passed to it most data types have one value that is considered the false value for that data type every other value is consider true for examplethe integer the floating point number the empty stringthe empty listand the empty dictionary are all considered to be false when used as the condition for an if or loop statement all other values are true try entering the following into the interactive shellbool( false bool( false bool(''false bool([]false bool({}false bool( true bool('hello'true bool([ ]true bool({'spam':'cheese''fizz':'buzz'}true imagine that any statement' condition is placed inside call to bool(that isconditions are automatically interpreted as boolean values this is why the condition on line works correctly the call to the isvalidmove(function either returns the boolean value false or non-empty list if you imagine that the entire condition is placed inside call to bool()then line ' condition false becomes bool(false(whichof courseevaluates to falseand condition of nonempty list placed as the parameter to bool(will return true getting the score of the game board def getscoreofboard(board) determine the score by counting the tiles returns dictionary with keys 'xand ' xscore post questions to