I need some help of mathematicians :D , So here is the problem
So i am calculating calories in foods.
If I google for "calories in banana" , I get this
For 100 grams its 89 calorie ,
for 81 grams its 72 calories.
for 225 grams its 200 calories.
So Basically I know 100 grams = 89 , keeping this value how to find other calorie values using custom grams.
for example
how much calorie in 224 grams.
As you notice, $100~\text{grams of banana} = 89~\text{calories of banana}$.
Dividing to one side, we get $\frac{100}{89}\cdot \frac{\text{grams of banana}}{\text{calories}}=1$ or equivalently $\frac{89}{100}\cdot\frac{\text{calories}}{\text{grams of banana}}=1$
You may always multiply anything by 1 without changing it's value. The trick is what "one" looks like. We may use the identity we found above.
For arbitrary $x~\text{grams of banana}$, we have
$$(x~\text{grams of banana})\cdot 1 = (x~\text{grams of banana})\cdot (\frac{89}{100}\cdot\frac{\text{calories}}{\text{grams of banana}}) = x\cdot \frac{89}{100}~\text{calories}$$
I should hope it goes without saying, but the exact ratio of calories to grams depends on what object it is in question. The ratio given above works for bananas, but might not work for water or for chocolate cake. You would need to find out how many calories are in each of those foods to create a new ratio. To create the ratio, again, you find some source of information that says "there are $C$ amount of calories in $G$ many grams of such and such food", and you can create a "one" to multiply by as $\frac{C}{G}\cdot\frac{\text{calories}}{\text{grams of such and such}}=1$