Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
No, this is more on the logic analysis and grammar literacy side of things. So, you as an observer are able to identify four types of dinasors and 3 types of food.
Based on these info, you know that both brachiosaurus and the triceratops are herbivores (vegetarians), with an exception that triceratops cannot eat leaves. The same goes for omnivores (T-Rex and velociraptor) cannot eat flowers and leaves.
So, if such an exception happens, you replace the dinosaur with Something as it would not make sense to say a herbivore is eating a dead dino or an omnivore is eating plants.
However, for the case of
vvvvvvvvvvv
, you are able to identify the dinosaur beingvelociraptor
, just not what he is eating on. So, your statement of sayingA velociraptor is eating something
is entirely true, hence you do not need to replaceA velociraptor
withSomething
. Hope it makes sense ^^This is not an issue. Find out what you think who ate what, then check if some possibilities are very unlikely (like a vegetanosaurus eating meat), and adjust your assessment in such cases.
worst task ever!!!
Yes. I always get the same answer when I run in repl.it : 'A triceratops is eating something.' Here though, I do pass the initial test thought that asks for 'Somethng is eating leaves.' I am very confused. If I understood if there was a hierachy, like animal bite marks take presidence of food type or vice versa.
https://repl.it/@listenToRipley/dinos#index.js
Do you get expected result also when you run your solution twice?
For Javascript; I feel like it's asking for two different outputs for the same into and I am loosing it a little. I've passed all my tests but one: Expected: 'A triceratops is eating something.', instead got: 'Something is eating leaves.', the weird thing is one of the tests is console.log('10 :',lunchTime("|||uuVuu|||")) which is expect to have 'Something is eating leaves.' Of course though when I test my code in Repl.it, it get the expected output. Started to feel like there is a bug in the test. Anyone have any ideas of what I am doing wrong?
The rules of this kata (and its testing) seem to be inconsistent to me. According to the description, if a known dinosaur [bitemark] is eating an item that it should not be eating or eating an unidentifiable item then the return statement should be "Something is eating xxxxx".
From the desc: lunchTime("|||uuVuu|||") // => "Something is eating leaves."
Yet the test expects that "vvvvvvvvvvv" should be "A velociraptor is eating something."
Why isn't it "Something is eating something"?
Otherwise shouldn't the example in the description be //=> "A triceratops is eating something"?
I think we should add the note that "the food will be 3 characters long before AND after the bite marks." to the kata's description: @justintc23
Here's a tip for those stuck on the "Triceratops is eating something" that should be "Something is eating something". When considering a case when food is "something", keep in mind that the food will be 3 characters long before AND after the bite marks. that's why it says "... ...". So whatever is in between the food will be the bite mark.
Thanks for the tip, i got it. I was not aware i could print out for the tests.
slight change made.
@FArekkusu: I already explained to you below how it works. It's a "moving" pattern, not a simple pattern, that's all. Nonetheless, this is a pattern!
I'm talking about the
not this case exactly. This is what is annoying, the
not-really-triceratops
case is logical at least, but the difference indead dino/something
pattern length is a joke.wtf! x) But the string MATCHES the pattern, guys. If you do not see the right pattern, it's up to you. ;o
EDIT: I'll make a slight update in the description... :p
B4B decided it to be a correct case, so whatever, although I agree that making a "universal pattern" and a string which doesn't correspond to it is totally wrong.
there is a pattern. If you don't see it because it has a small trick, it's fine. But there is.
Loading more items...