python
def getEvolutionRateMessage(before,after): if before == 0 and after == 0: return "No evolution." evolution = after * 100 if before == 0 else before * 100 if after == 0 else round(((after-before) / before)*100) return "A positive evolution of "+str(int(evolution))+'%' if before<after else "A negative evolution of "+str(int(evolution*-1) if evolution <0 else int(evolution))+'%' if before > after else "No evolution."
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
python