Proposal: Complete twelve-days exercise with tuple-based solution

Hello Exercism Python maintainers,

I’ve completed the twelve-days practice exercise and submitted a pull request (#3944) to improve it. As per the bot’s instructions, I’m opening this topic to discuss my changes before the PR can be reopened. Here’s what I’ve done:

  • Implemented recite in twelve_days.py using tuples to align with the tuples concept.
  • Added .meta/exemplar.py with a tuple-based solution.
  • Updated .meta/example.py to use tuples instead of lists.
  • Added README.md with the exercise description and source link.
  • Verified .meta/config.json, .meta/template.j2, and .meta/tests.toml for correctness.
  • Regenerated twelve_days_test.py using configlet generate --only twelve-days.
  • Confirmed all 15 tests pass with pytest twelve_days_test.py.
  • Validated the exercise structure with configlet lint.

The PR is at: Complete twelve-days: implement recite with tuples, add exemplar.py a… by kumarsuraj9798 · Pull Request #3944 · exercism/python · GitHub

My goal was to address the stub implementation of twelve_days.py, ensure tuple usage for consistency with the tuples concept, and add missing files like README.md and .meta/exemplar.py. Please let me know if these changes align with the track’s goals or if any adjustments are needed. I’d appreciate feedback on how to proceed to get the PR reopened.

Thanks,
Suraj Yadav (GitHub: kumarsuraj9798, Exercism: [your Exercism handle])

You’ve explained what you have done. What I’m not seeing is very much explanation of what about the exercise needs improving, or how any of the changes is an improvement.

You should give this a read, too: Suggesting Exercise Improvements | Exercism's Docs

Hi @kumarsuraj9798,

Welcome to the Exercism fourms! Thank you for submitting a PR to improve the Twelve Days exercise on the Python track.

One of the reasons that we ask that PRs be discussed in advance of the work is that there are often things that contributors are unaware of or confused by within the Exercism “ecosystem”.

One of those is the difference between practice exercises and concept exercises.

Tweleve Days is a practice exercise. Practice exercises are commonly cross-language-track exercises that are pulled from a central problem-specifications repo, and have a common set of instructions and test data.

To make changes to those descriptions or tests requires discussion and sign-off from multiple track maintainers because any change would impact all language tracks that use the exercise. Hence Isaacs question about why you want to make the changes

What you see on the Python track is an implementation of the problem-specifications exercise, with tests that have been selected via the .meta/tests.toml file and a Python test file that is auto-generated using a track script (not configlet) via the .meta/template.j2.

The example.py file is there to “prove” there is a solution for the exercise that satisfies the tests as generated - it is not an ideal solution, nor is is expected to even be an idiomatic solution — and it should in no way be copied by students.

We don’t use exemplar files for practice exercises because there is no “one right way” or “ideal” for how to solve them. They are intended to be open-ended, and many of them are designed to provoke discussion with a mentor.


From looking at your PR, it appears what you’d like to do is change the example.py file to use tuples in more places. But again - that file is there to prove the tests are passible and not to point students in a solution direction. You have also put a solution into the stub file (twelve_days.py) that is shown to students, which would give them the answer before they start coding.

Per above, practice exercises don’t use exemplar.py files. They also don’t use README.md files because the content in the repo is not “public facing”. It is intended to be consumed by the website and formatted for public use there.


If what you wish to show is how students could better use tuples in their solutions, you could write one or more approaches for the exercise. Here is a repo example from the Acronym exercise that shows multiple approaches as well as an introduction document outlining them.

But as it stands right now (as much as we appreciate the effort), your PR is not something we want on the Python track.

1 Like

A post was split to a new topic: Python function help