Fix for #123868

Edge case rounding error corrected in line 56.
Also removed spaces throughout for style consistency.
Merge pull request #123996 from joepasini/exercises_jp

Fix for #123868