6.00.2x-pset3.py
def update(self):
        """
        Update the state of the virus population in this patient for a single
        time step.

        returns: The total virus population at the end of the update (an
        integer)
        """
        copyViruses = self.getViruses()[:]
        for virus in copyViruses:
            if virus.doesClear():
                self.viruses.remove(virus)
        if self.getPopDensity() < 1:
            copyViruses = self.getViruses()[:]
            for virus in copyViruses:
                try:
                    # Line bellow broken to comply with pep8
                    self.viruses.append(
                        virus.reproduce(
                            self.getPopDensity(), self.getPrescriptions()
                        )
                    )
                except NoChildException:
                    pass
        return self.getTotalPop()

        Update the state of the virus population in this patient for a single
        time step.

        returns: The total virus population at the end of the update (an
        integer)
        
Update the state of the virus population in this patient for a single
time step.

The total virus population at the end of the update (an
integer)
Update the state of the virus population in this patient for a single time step . The total virus population at the end of the update ( an integer )
def update(self):
        copyViruses = self.getViruses()[:]
        for virus in copyViruses:
            if virus.doesClear():
                self.viruses.remove(virus)
        if self.getPopDensity() < 1:
            copyViruses = self.getViruses()[:]
            for virus in copyViruses:
                try:
                    self.viruses.append(
                        virus.reproduce(
                            self.getPopDensity(), self.getPrescriptions()
                        )
                    )
                except NoChildException:
                    pass
        return self.getTotalPop()
def update ( self ) : copyViruses = self . getViruses ( ) [ : ] for virus in copyViruses : if virus . doesClear ( ) : self . viruses . remove ( virus ) if self . getPopDensity ( ) < 1 : copyViruses = self . getViruses ( ) [ : ] for virus in copyViruses : try : self . viruses . append ( virus . reproduce ( self . getPopDensity ( ) , self . getPrescriptions ( ) ) ) except NoChildException : pass return self . getTotalPop ( )
Update the state of the virus population in this patient for a single
time step.
Update the state of the virus population in this patient for a single time step .
"""
        Update the state of the virus population in this patient for a single
        time step.

        returns: The total virus population at the end of the update (an
        integer)
        """ # Line bellow broken to comply with pep8
self