Im on ps12 and Im not sure if Im doing the doesClear function inside the simplePatient class. This is my code: http://dpaste.com/hold/591287/ Im trying to figure out if it is dependent upon self.clearProb (if it is then Im not doing this right...) Any of you course "graduates" there to help out? (dont mind the other stuff for now)
ok you are doing that wrong, and your right in guessing that it is dependant on self.clearProb. you need something like random.random() (returns a float between 0 and 1) to produce a random number to compare to your clearProb and muteProb too, from there you just do a simple: random.random() <cmp> self.clearProb: return <Boolean>
oooooh ok thanks~! that had me stumped for a little bit. I also had misread the problem and thought i had to use random.randint() not random.random(). thanks. I think Im having further issues with my mutation portion of resistant virus (its not in the above code). I'll post another Q tomorrow If I cant work it out tonight)
Join our real-time social learning platform and learn together with your friends!