5 kyu

The Hunger Games - Zoo Disaster!

496 of 2,770dinglemouse
Description
Loading description...
Fundamentals
  • Please sign in or sign up to leave a comment.
  • trashy_incel Avatar

    there are 11 animals but Map.of() only goes up to 10 entries. Coincidence ? I think not...

  • shreedave Avatar

    Don't lions eat sheep???

  • HerrWert Avatar

    Why is there no dinglemouse in the zoo? And what would it eat?

  • hobovsky Avatar

    Random tests are terribly noisy. They should not print to stdout, and context information should be provided with titles of tests and/or with failure mesages.

  • laurelis24 Avatar

    Loved this one. One of the best kyus i'v done in a while. Easy to understand what needs to be done. 0 Maths. Text formatting was a bit annoying tho. But probably a bit too easy for 5.

  • akar-0 Avatar
  • akar-0 Avatar
  • ahmed the potato Avatar

    how do i get the animal list (python)

  • DiSSNiKO Avatar

    I dont understand what the output is supposed to be (Python)

  • mubtadaali Avatar

    Ahhh... That was fun, incredibly enjoyable. Loved this kata!

  • Mohrezakhorasany Avatar

    Always so many small teaching parts in your Katas! :) I did so far enjoy all of them!

  • ElectricZatch Avatar

    There is a new C++ translation up for review.

  • QoOdrink3r Avatar

    src/Solution.cs(6,46): error CS8652: The feature 'target-typed object creation' is currently in Preview and unsupported. To use Preview features, use the 'preview' language version. src/Solution.cs(42,22): error CS8652: The feature 'or pattern' is currently in Preview and unsupported. To use Preview features, use the 'preview' language version.

    :(

  • Stefan30 Avatar

    This kata was very fun, but, for me, the formated string result was such a big pain, you've got no ideea. Why can't I just print the remaining animals after each step? Anyways, great, fun kata.

  • Uriaz Avatar

    "lion,chicken,cow".... nothing happen, the chicken protect the cow from the lion ?! xD

  • glebec Avatar

    (Haskell):

    When I try to run the Test suite (not Attempt) I get an error:

    test/ZooSpec.hs:3:1: error:
        Could not find module ‘Zoo’
        Use -v (or `:set -v` in ghci) to see a list of the files searched for.
      |
    3 | import Zoo (whoEatsWho)
      | ^^^^^^^^^^^^^^^^^^^^^^^
    

    It looks like the module is named ZooKeeping, but the tests try to import Zoo. Updating the tests to import ZooKeeping fixes the error.

  • Beefy1 Avatar

    Solved this using a recursive function. Does this qualify as best practice?

  • AIMPED Avatar

    Thank you very much for authoring these kind of katas! They are so much more fun to solve than lot's of the other katas just because of the "story".

  • helldrum Avatar

    thanks for this kata, i feel dumb when i compare my solution to others, good ;)

  • chucky-1 Avatar

    let's give the food chain at the entrance. What's the point of typing it manually?

  • Karoluso Avatar

    Nice KATA. But the instruction should be more thorough and give some details what should be an output in case of extraordinary inputs e.g. if input string is empty - why the output should contain 2 empty strings instead of three. How can we guess that. This should be specified in instruction. The same is concerning two consecutive operations(eatings) e.g. what if we have two bears and they eat the same ( one after the other) - should it be returned one time only (?) or we should treat that as two separate eatings even though they are the same.

    Ufff.. anyway I eventually solved it and the idea of Kata , I must admit, is very nice. Cheers!

  • Karoluso Avatar

    This comment has been hidden.

  • dawidszewczyk Avatar

    Love it! Thanks for creating this Kata

  • profesija_dr Avatar

    I cannot get past this test. I have passed 9 out of 10 but this I fail. (Python) Why does my bear eat them all? :)

    ['bear,grass,grass,grass,grass,sheep,bug,chicken,little-fish,little-fish,little-fish,little-fish,big-fish,big-fish,big-fish', 'sheep eats grass', 'sheep eats grass', 'sheep eats grass', 'sheep eats grass', 'bear eats sheep', 'bear eats bug', 'bear eats chicken', 'bear eats little-fish', 'bear eats little-fish', 'bear eats little-fish', 'bear eats little-fish', 'bear eats big-fish', 'bear eats big-fish', 'bear eats big-fish', 'bear'] should equal ['bear,grass,grass,grass,grass,sheep,bug,chicken,little-fish,little-fish,little-fish,little-fish,big-fish,big-fish,big-fish', 'sheep eats grass', 'sheep eats grass', 'sheep eats grass', 'sheep eats grass', 'bear eats sheep', 'bear eats bug', 'bear eats chicken','big-fish eats little-fish', 'big-fish eats little-fish', 'big-fish eats little-fish', 'big-fish eats little-fish', 'bear eats big-fish','bear eats big-fish', 'bear eats big-fish', 'bear']

    As I have read the rules again I think that my solution was good. 'Always the LEFTMOST animal capable of eating will eat before any others.' May I post my code here?

  • PlayBossWar Avatar

    This was a realy awesome kata, loved it!

  • zhamar Avatar

    The Haskell check of the solution for this task is broken: "the module Zoo is missing." So I can not "attempt" my solution, although the "run sample tests" is successfull.

  • Courtland9777 Avatar

    I feel like my grandmother even mentioning this but, "who eats who" should be "who eats whom". Fun Kata though :).

  • jages Avatar

    i was a bit confused with the output section of this kata. given an empty input, i expected the expected output would be two empty strings - the tests, however, only expect one empty strign to be returned if an empty string is given as input. IMO this could use with a touch up ;)

  • Jaune9 Avatar

    Very good kata "story", thanks a lot !

  • beautyistruth1 Avatar

    Very good kata. I felt like you needed a solid understanding of several fundamentals to pass.

  • Abbabon Avatar

    The method should be called 'whoEatsWhom'

    #sorrynotsorry

  • artbohr Avatar

    Very good kata, many fundamentals are neccesary to pass this one.

  • arfro Avatar

    @Dinglemouse I always find your awesome animal-related katas 10 min before bedtime, try and brain them out a bit and then I dream the weirdest cr4p - last time it was ants bridge and I dreamt I was teaching them switch statements in god!amn PHP ;( Will leave this one for tomorrow! Anyway, point of this comment being: great job with your katas, I find them incredibly enjoyable :)

  • joecastle Avatar

    C# translation added!

  • axell Avatar

    This comment has been hidden.

  • jundymek Avatar

    This comment has been hidden.

  • etomkra Avatar

    This comment has been hidden.

  • hufftheweevil Avatar

    A unique and fun kata, thanks

  • Blind4Basics Avatar
  • smile67 Avatar

    Was ranked between 5 and 6kyu... i think Voile needs some last points to 1dan, so approved as 5kyu:-)... Happy Hunger Games...

  • JohanWiltink Avatar

    That was fun! :]

    zoo should have been an Array of course, but that must not be changed any more. And why return the original input as the first output? Afraid you'd forget? :yum:

  • dinglemouse Avatar

    ADVERT

    When all the animals are eating each other that is what I call a Zoo Disaster!