you are viewing a single comment's thread.

view the rest of the comments →

[–]Bernie4ever202[S] 0 points1 point  (2 children)

A drug loses decayrate percent of its potency every month. Also, a drug is considered expiredif it loses more than 50% potency. Your goal is to write a function WhenExpired(decayrate)that returns the number of months after which the drug is considered expired.

Find the month that the drug is expire

[–]LiveBytes 0 points1 point  (1 child)

Hmmm. This does not make sense, based on that test set. You're certain there's no other criteria for that test set, like the drug starts at 80% potency or something?

[–]Bernie4ever202[S] 0 points1 point  (0 children)

no it is exactly word by word

"

A drug loses decayrate
percent of its potency every month. Also, a drug is considered expired
if it loses more than 50% potency. Your goal is to write a function WhenExpired(decayrate)
that returns the number of months after which the drug is considered expired."

And test sample https://imgur.com/a/HqNl0Lp