6.00.2x-pset3.py
def isResistantTo(self, drug):
        """
        Get the state of this virus particle's resistance to a drug. This
        method is called by getResistPop() in TreatedPatient to determine
        how many virus particles have resistance to a drug.

        drug: The drug (a string)

        returns: True if this virus instance is resistant to the drug, False
        otherwise.
        """
        try:
            if self.getResistances()[drug]:
                return True
            else:
                return False
        except KeyError:
            return False

        Get the state of this virus particle's resistance to a drug. This
        method is called by getResistPop() in TreatedPatient to determine
        how many virus particles have resistance to a drug.

        drug: The drug (a string)

        returns: True if this virus instance is resistant to the drug, False
        otherwise.
        
Get the state of this virus particle's resistance to a drug. This
method is called by getResistPop() in TreatedPatient to determine
how many virus particles have resistance to a drug.

The drug (a string)

True if this virus instance is resistant to the drug, False
otherwise.
Get the state of this virus particle ' s resistance to a drug . This method is called by getResistPop () in TreatedPatient to determine how many virus particles have resistance to a drug . The drug ( a string ) True if this virus instance is resistant to the drug False otherwise .
def isResistantTo(self, drug):
        try:
            if self.getResistances()[drug]:
                return True
            else:
                return False
        except KeyError:
            return False
def isResistantTo ( self , drug ) : try : if self . getResistances ( ) [ drug ] : return True else : return False except KeyError : return False
Get the state of this virus particle's resistance to a drug.
Get the state of this virus particle ' s resistance to a drug .
"""
        Get the state of this virus particle's resistance to a drug. This
        method is called by getResistPop() in TreatedPatient to determine
        how many virus particles have resistance to a drug.

        drug: The drug (a string)

        returns: True if this virus instance is resistant to the drug, False
        otherwise.
        """
self
drug