Ad
  • Custom User Avatar

    If there are an equal number of naughty and nice it should return 'naughty'. In the example you provided there is 1 naughty ('broke...') and 1 nice ('got...') while the other 2 don't fit the pattern. Without seeing your code I can't offer suggestions but it worked for me in Ruby.

  • Custom User Avatar

    Language?

    Also, are you sure you are not modifying the initial array?

  • Custom User Avatar

    So Strings that start with the letters b, f, or k are naughty. Strings that start with the letters g, s, or n are nice.
    and if there is an equal amount of bad and good actions, return 'naughty'.

    why did this fail?
    Testing for [got someone a new car, broke a vending machine, learnt a new algo, pet a cat, yawned]
    ✘ It should work for random inputs too - Expected: 'naughty', instead got: 'nice'

    I think the exercise is bugged, remeber you said that all other strings are neither.
    it passes 48 tests and fails 4