|{ } |{ } |{ } |{ } |{ } |{ } |{ } |{ } |{ } |{ } |{ } |{ } |{ } +++ ''format(*waterdisplay) check if any of the buckets has the goal amount of water for wateramount in waterinbucket values() if wateramount =goal print('good jobyou solved it in'steps'steps!' sys exit( let the player select an action to do with bucket print('you can:' print(( )ill the bucket' print(( )mpty the bucket' print(( )our one bucket into another' print(( )uit' while truekeep asking until the player enters valid action move input(''upper( if move ='quitor move =' ' print('thanks for playing!' sys exit( if move in (' '' '' ') break player has selected valid action print('enter fepor ' let the player select bucket while truekeep asking until valid bucket entered print('select bucket or quit:' srcbucket input(''upper( if srcbucket ='quit' print('thanks for playing!' sys exit( if srcbucket in (' '' '' ') break player has selected valid bucket carry out the selected action if move =' ' set the amount of water to the max size srcbucketsize int(srcbucket waterinbucket[srcbucketsrcbucketsize steps + elif move =' ' waterinbucket[srcbucket set water amount to nothing steps + water bucket puzzle