Budget App confusion on percentage

I’m unsure about the calculation on the calculation of the percentage spent. I know how to do the math, that isn’t the issue, but I’m a little unsure about the clarity of the directions, I’m afraid.

Are we calculating for the whole? As in, if each category had $100 and each category spent $100, would the pecentages be 33.33%, as they are relative to the whole, or would they each be 100%, as they are relative to themselves?

Sorry if this is obvious to everyone else =/
Thanks so much.

Welcome to the forums @Bazookajoe.

It’s only really obvious when you do it one way and it fails the tests because that’s what Murphy dictated.

It’s the ratio of the amount spent in one category to the total spent in all categories, unless I’ve misread my code. Or in your example, the 33.33% option. Don’t forget to round according to the spec.

Good luck.