exercism / python

Exercism exercises in Python.
https://exercism.org/tracks/python
MIT License
1.94k stars 1.29k forks source link

Python Forth Exercise Test 29 is wrong #3199

Closed joMarsch closed 2 years ago

joMarsch commented 2 years ago

Test 29 of the Forth exercise seems wrong. If I understand the test the right way the output should be [1,2,2] instead of [1,2,1].

github-actions[bot] commented 2 years ago

🤖   🤖

Hi! 👋🏽 👋 Welcome to the Exercism Python Repo!

Thank you for opening an issue! 🐍  🌈 ✨


​          ◦ If you'd also like to make a PR to fix the issue, please have a quick look at the Pull Requests doc.
             We  💙  PRs that follow our Exercism & Track contributing guidelines!


💛  💙  While you are here... If you decide to help out with other open issues, you have our gratitude 🙌 🙌🏽.
Anything tagged with [help wanted] and without [Claimed] is up for grabs.
Comment on the issue and we will reserve it for you. 🌈 ✨

BethanyG commented 2 years ago

Hi @joMarsch 👋🏽

Thanks for filing this issue. The Python track pulls test data (inputs and expected results) from a central repo, problem specifications, where the canonical data shows that [1,2,1] is indeed the expected result for the case.

I would recommend that you either open an issue in that repo to discuss things, or open a discussion on our discussion forum to talk through the exercise and the test results, and where you think they should be changed or improved.

Once we get an understanding of what should be changed in problem specifications, all repos that pull from there can be updated with the information.

qianzhong516 commented 7 months ago

For anyone who might have encountered the same confusion - I searched for the forth documentation and realised what the OVER command actually does is:

OVER ( n1 n2 — n1 n2 n1 ) Copies second item to top

Hence the test is actually correct.

Link: https://www.forth.com/starting-forth/2-stack-manipulation-operators-arithmetic/