Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(curriculum): limit hardcoding roman numerals #54819

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

a2937
Copy link
Member

@a2937 a2937 commented May 15, 2024

Checklist:

Ref #54063

I added two tests. One for numbers less than negative one and one for numbers greater than four thousand. This is the only amount of testing I can add without implementing the solution to the problem inside one of the tests.

@github-actions github-actions bot added the scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. label May 15, 2024
@moT01 moT01 added the status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. label May 20, 2024
@gikf
Copy link
Member

gikf commented May 31, 2024

Another option for some randomness, instead of full-fledged solution, could be composing randomized number to convert from some pieces.

For example:
Pick random tens: 10, 20, 30, 40, 50, 60, 70, 80, 90
Pick random ones: 1-9

Then compose expected result from the conversions:

{ 1: 'I', 2: 'II', 3: 'III', 4: 'IV', 5: 'V', 6: 'VI', 7: 'VII', 8: 'VIII', 9: 'IX',
  10: 'X', 20: 'XX', 30: 'XXX', 40: 'XL', 50: 'L', 60: 'LX', 70: 'LXX', 80: 'LXXX', 90: 'XC' }

These ranges are fully arbitrary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants