vendredi 28 octobre 2016

Comparing the values within a specified range

I am working on a python code and need to compare that whether two values are within the 10% range of each other and I am not getting what code I can implement to handle this.

For e.g. for one item the value of fat is 100 and for the other it is 110. Now I want to check whether both of the values are within the 10% range of each other and if this condition is met I have to print something (I can do it). I just want to know what to write in the if condition of the program.

Aucun commentaire:

Enregistrer un commentaire