Created attachment 179176 [details] Screenshot of exercise with too little money to pay SUMMARY In the German version of the exercise "Give Tux his change, including cents" you can see in the screenshot, that the overall price of the goods is 7,15 €. But the maximum amount available, you can select, is 7,09 €. So with this bug, the exercise is unsolveable. The error has occured at level 4 of this exercise. Though being a clear error evidenced with a screenshot, it was not reproducable. Nevertheless, there must be a flaw, maybe in the calculation algorithm STEPS TO REPRODUCE - OBSERVED RESULT Only 7,09 € are availlable in the excercises money-pool, while the demanded overall-amount is 7,15 € EXPECTED RESULT That at least the same amount demanded was available in the money-pool, so at least 7,15 € here SOFTWARE/OS VERSIONS Software: GCompris for Linux, Version 4.3 OS: Linux --> Debian-based distro Emmabuntüs, Version DE5 1.03 ADDITIONAL INFORMATION
Hi, thank you for the report and the screenshot. After a first look at the code (https://invent.kde.org/education/gcompris/-/blob/38c10a39ee02ba41a1c61c1f37b25e3d189a13a4/src/activities/money_cents/resource/1/Data.qml#L76-91), the max price for the items should have been 7, I'll dig more to understand how it was possible to have more than this.
Git commit 42943efed5bc22068d46638ac501550e659ef1f3 by Johnny Jazeix. Committed on 06/03/2025 at 20:23. Pushed by jjazeix into branch 'master'. money_with_cents, make sure we are not above the maximum M +6 -0 src/activities/money/money.js https://invent.kde.org/education/gcompris/-/commit/42943efed5bc22068d46638ac501550e659ef1f3
Git commit 50e341697bfe8caf8a6b6cd74d486354d2bf1477 by Johnny Jazeix. Committed on 06/03/2025 at 20:24. Pushed by jjazeix into branch 'KDE/25.0'. money_with_cents, make sure we are not above the maximum M +6 -0 src/activities/money/money.js https://invent.kde.org/education/gcompris/-/commit/50e341697bfe8caf8a6b6cd74d486354d2bf1477
The issue was with the algorithm indeed, we managed to have more than the maximum if the first items were less than 2, but with higher cents than the last one and the last one was the maximum value remaining.
A big Tank-You to you, Johnny, for for proper reaction!
Git commit 87e74e743311bb41b34f1a18cb995a5182fd0bf7 by Timothée Giet, on behalf of Johnny Jazeix. Committed on 10/03/2025 at 09:49. Pushed by jjazeix into branch 'KDE/4.0'. money_with_cents, make sure we are not above the maximum M +6 -0 src/activities/money/money.js https://invent.kde.org/education/gcompris/-/commit/87e74e743311bb41b34f1a18cb995a5182fd0bf7