bext bg('black' bext clear( generate the global variables fishes [ for in range(num_fish) fishes append(generatefish() notebubbles are drawnbut not the bubblers themselves bubblers [ for in range(num_bubblers) each bubbler starts at random position bubblers append(random randint(left_edgeright_edge) bubbles [ kelps [ for in range(num_kelp) kelpx random randint(left_edgeright_edge kelp {' 'kelpx'segments'[] generate each segment of the kelp for in range(random randint( height )) kelp['segments'append(random choice(['('')']) kelps append(kelp run the simulation step while true simulateaquarium( drawaquarium( time sleep( frames_per_second clearaquarium( step + def getrandomcolor() """return string of random color "" return random choice(('black''red''green''yellow''blue' 'purple''cyan''white') def generatefish() """return dictionary that represents fish "" fishtype random choice(fish_types set up colors for each character in the fish text colorpattern random choice(('random''head-tail''single') fishlength len(fishtype['right'][ ] if colorpattern ='random'all parts are randomly colored colors [ for in range(fishlength) colors append(getrandomcolor() if colorpattern ='singleor colorpattern ='head-tail' colors [getrandomcolor()fishlength all the same color if colorpattern ='head-tail'head/tail different from body headtailcolor getrandomcolor( project #