alchemist/laboratory.py
def run_full_experiment(self):
        """Run a full experiment on the current laboratory

        Following the wizard specification for carrying out lab work on the
        standardised 2-shelf wizard lab this function simulates a run. At each
        reaction attempt, it goes through the substances in the lower shelf
        from left to right, when it finds a substance which can react with one
        or more substances on the upper shelf it uniformly randomly picks one
        of these substances to react with and removes the reactants.

        It does this until no more reactions can take place at which point it
        terminates, printing the total number of reactions and return the final
        lower and upper shelves.

        :return: (lower_shelf, upper_shelf, count) the final shelves after
        running the experiment session and total number of reactions taken
        place

        """
        count = 0
        ended = False
        while not ended:
            reaction_occurred = self.do_a_reaction()
            if reaction_occurred:
                count += 1
            else:
                # If no reaction occurred, the experiment is done
                ended = True
        return self.shelves["lower"], self.shelves["upper"], count
Run a full experiment on the current laboratory

        Following the wizard specification for carrying out lab work on the
        standardised 2-shelf wizard lab this function simulates a run. At each
        reaction attempt, it goes through the substances in the lower shelf
        from left to right, when it finds a substance which can react with one
        or more substances on the upper shelf it uniformly randomly picks one
        of these substances to react with and removes the reactants.

        It does this until no more reactions can take place at which point it
        terminates, printing the total number of reactions and return the final
        lower and upper shelves.

        :return: (lower_shelf, upper_shelf, count) the final shelves after
        running the experiment session and total number of reactions taken
        place

        
Run a full experiment on the current laboratory
Following the wizard specification for carrying out lab work on the
standardised 2-shelf wizard lab this function simulates a run. At each
reaction attempt, it goes through the substances in the lower shelf
from left to right, when it finds a substance which can react with one
or more substances on the upper shelf it uniformly randomly picks one
of these substances to react with and removes the reactants.

It does this until no more reactions can take place at which point it
terminates, printing the total number of reactions and return the final
lower and upper shelves.
Run a full experiment on the current laboratory Following the wizard specification for carrying out lab work on the standardised 2 - shelf wizard lab this function simulates a run . At each reaction attempt it goes through the substances in the lower shelf from left to right when it finds a substance which can react with one or more substances on the upper shelf it uniformly randomly picks one of these substances to react with and removes the reactants . It does this until no more reactions can take place at which point it terminates printing the total number of reactions and return the final lower and upper shelves .
def run_full_experiment(self):
        count = 0
        ended = False
        while not ended:
            reaction_occurred = self.do_a_reaction()
            if reaction_occurred:
                count += 1
            else:
                ended = True
        return self.shelves["lower"], self.shelves["upper"], count
def run_full_experiment ( self ) : count = 0 ended = False while not ended : reaction_occurred = self . do_a_reaction ( ) if reaction_occurred : count += 1 else : ended = True return self . shelves [ "lower" ] , self . shelves [ "upper" ] , count
Run a full experiment on the current laboratory
Following the wizard specification for carrying out lab work on the
standardised 2-shelf wizard lab this function simulates a run.
Run a full experiment on the current laboratory Following the wizard specification for carrying out lab work on the standardised 2 - shelf wizard lab this function simulates a run .
"""Run a full experiment on the current laboratory

        Following the wizard specification for carrying out lab work on the
        standardised 2-shelf wizard lab this function simulates a run. At each
        reaction attempt, it goes through the substances in the lower shelf
        from left to right, when it finds a substance which can react with one
        or more substances on the upper shelf it uniformly randomly picks one
        of these substances to react with and removes the reactants.

        It does this until no more reactions can take place at which point it
        terminates, printing the total number of reactions and return the final
        lower and upper shelves.

        :return: (lower_shelf, upper_shelf, count) the final shelves after
        running the experiment session and total number of reactions taken
        place

        """ # If no reaction occurred, the experiment is done
(lower_shelf, upper_shelf, count) the final shelves after
running the experiment session and total number of reactions taken
place
( lower_shelf upper_shelf count ) the final shelves after running the experiment session and total number of reactions taken place
self