Skip to content

Idea for new exercise (Polar bear) #325

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

Open
rmunn opened this issue Aug 8, 2016 · 1 comment
Open

Idea for new exercise (Polar bear) #325

rmunn opened this issue Aug 8, 2016 · 1 comment

Comments

@rmunn
Copy link
Contributor

rmunn commented Aug 8, 2016

I originally submitted this idea as exercism/fsharp#164, but it really belongs here.

There are already three exercises with the basic idea of "Here is some text with a repeating pattern; write a function to print out that text". So a fourth one may not be useful. However, if a fourth such exercise would be useful, this Code Golf challenge could be turned into such an exercise:

http://codegolf.stackexchange.com/questions/85746/polar-bear-polar-bear-what-do-you-hear

The one thing this exercise would contain that the others wouldn't is that the "a / an" distinction in English would be relevant, and you can't easily "cheat" by baking it into the stored data. So you'd need a helper function of some kind to turn "Polar Bear" into "a polar bear", but "Elephant" into "an elephant".

The Python 3 implementation of that Code Golf puzzle includes a non-golfed version, which could easily be turned into sample code in most languages. So it shouldn't take too much work to implement this exercise if someone wants to take it on.

It's also worth having a discussion on whether three (or four!) text-based exercises are too many, and whether they should be merged or any of them should be dropped (including this idea, of course). But I'll open a separate issue for that discussion.

@rmunn
Copy link
Contributor Author

rmunn commented Aug 8, 2016

Actually, there are four, not three: I forgot the food-chain exercise in my first comment.

@Insti Insti changed the title Idea for new exercise Idea for new exercise (Polar bear) Aug 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants