<s> """<STR_LIT>""" <EOL> import random <EOL> from Exercises . RomeoAndJuliet . util import parser <EOL> from Exercises . RomeoAndJuliet . util import result <EOL> def strat_empty ( play ) : <EOL> """<STR_LIT>""" <EOL> ret_val = result . Result ( ) <EOL> for act in play . gen_acts ( ) : <EOL> for scene in act . gen_scenes ( ) : <EOL> ret_val . set_act_scene ( act , scene ) <EOL> while True : <EOL> my_choice = '<STR_LIT>' <EOL> actual_actor = ret_val . guess ( my_choice ) <EOL> if actual_actor is None : <EOL> break <EOL> return ret_val <EOL> def strat_random_all ( play ) : <EOL> """<STR_LIT>""" <EOL> ret_val = result . Result ( ) <EOL> all_actors = play . dramatis_personae . keys ( ) <EOL> for act in play . gen_acts ( ) : <EOL> for scene in act . gen_scenes ( ) : <EOL> ret_val . set_act_scene ( act , scene ) <EOL> while True : <EOL> my_choice = random . choice ( all_actors ) <EOL> actual_actor = ret_val . guess ( my_choice ) <EOL> if actual_actor is None : <EOL> break <EOL> return ret_val <EOL> def main ( ) : <EOL> play = parser . get_play ( ) <EOL> print '<STR_LIT>' <EOL> result = strat_empty ( play ) <EOL> print result <EOL> print <EOL> print '<STR_LIT>' <EOL> result = strat_random_all ( play ) <EOL> print result <EOL> print <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) <EOL> print '<STR_LIT>' </s>
