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

Exercise 5: Add solution using formula #464

Closed
wants to merge 1 commit into from

Conversation

nikitarevenco
Copy link
Contributor

I feel like some learners will especially appreciate this solution. It's the fastest way to solve the problem and a good reminder that sometimes math is the answer to all questions and not some complex algorithm :')

@MaoShizhong
Copy link
Contributor

I'm going to push back on this specific solution for the purpose of this exercise because I believe our exercise solutions should demonstrate things that should be reasonable for most learners to read based on what they've learnt so far. I'm not bothered by demonstrating "efficient" or "clever" solutions if they aren't relevant to what we can expect most learners to been exposed to and reasonably figure out.

Just like with the palindrome exercise, it used to contain a regex solution. It's definitely what I would go for now but that isn't reasonable to show people at this point. More people were confused and even discouraged by seeing that than curious. Instead, providing a more verbose non-regex solution that only uses what learners have reasonably been exposed to in the curriculum, that's been received much better.

@nikitarevenco
Copy link
Contributor Author

I'm going to push back on this specific solution for the purpose of this exercise because I believe our exercise solutions should demonstrate things that should be reasonable for most learners to read based on what they've learnt so far. I'm not bothered by demonstrating "efficient" or "clever" solutions if they aren't relevant to what we can expect most learners to been exposed to and reasonably figure out.

Just like with the palindrome exercise, it used to contain a regex solution. It's definitely what I would go for now but that isn't reasonable to show people at this point. More people were confused and even discouraged by seeing that than curious. Instead, providing a more verbose non-regex solution that only uses what learners have reasonably been exposed to in the curriculum, that's been received much better.

Thanks for your feedback. I agree with you

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.

None yet

2 participants