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

[New exercise]: resistor-color #16

Merged
merged 3 commits into from
Dec 18, 2023
Merged

Conversation

BNAndras
Copy link
Member

No description provided.

@BNAndras BNAndras marked this pull request as ready for review December 18, 2023 01:48
@BNAndras
Copy link
Member Author

@pfertyk This is available for review.

"uuid": "f8afa182-aca3-4464-96b7-9eb7f8d55449",
"practices": [],
"prerequisites": [],
"difficulty": 2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think that this should be difficulty 2 or 1? (in Python it's 1)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Up to you as maintainer. My general rule is that exercises of the same difficulty level should be equivalent in difficulty. hello-world would be 1 as the easiest exercise on the track, and resistor-color is more difficult than hello-world so 2 makes sense to me. On the student-facing side, difficulty levels 1 - 3 are all lumped as "easy" so difficulty 1 or 2 doesn't make a difference to them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see ;) In my opinion, if leap is level 1, than this also should be, but I'm not going to insist ;) Level 2 is OK for now, there will be probably some cleanup involved right before the release, so if something changes, we can update the difficulty then.

return [false, solution_script.color_code("black")]

func test_color_codes_white(solution_script):
return [false, solution_script.color_code('white"')]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a small typo here, making us look for white" instead of white. After fixing it, I believe we should compare the result to 9 instead of false.

What worries me a bit is the fact that my test runner should detect if the type of variables is different (e.g. int vs bool) and fail in that case. But if your tests are passing, then something went wrong ...

@pfertyk pfertyk merged commit 15b69e0 into exercism:main Dec 18, 2023
3 checks passed
@BNAndras BNAndras deleted the add-resistor-color branch December 26, 2023 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants