print('this program requires the bext modulewhich you' print('can install by following the instructions at' print(' sys exit( set up the constants width height tree ' fire ' empty (!try changing these settings to anything between and initial_tree_density amount of forest that starts with trees grow_chance chance blank space turns into tree fire_chance chance tree is hit by lightning burns (!try setting the pause length to or pause_length def main() forest createnewforest( bext clear( while truemain program loop displayforest(forest run single simulation step nextforest {'width'forest['width'] 'height'forest['height'] for in range(forest['width']) for in range(forest['height']) if (xyin nextforest if we've already set nextforest[(xy)on previous iterationjust do nothing here continue if ((forest[(xy)=empty and (random random(<grow_chance)) grow tree in this empty space nextforest[(xy)tree elif ((forest[(xy)=tree and (random random(<fire_chance)) lightning sets this tree on fire nextforest[(xy)fire elif forest[(xy)=fire this tree is currently burning loop through all the neighboring spaces for ix in range(- ) for iy in range(- ) project #