6 kyu

Answer the students' questions!

204KH!
Description
Loading description...
Algorithms
View
AllIssues1Questions1Suggestions2Show Resolved
  • Please sign in or sign up to leave a comment.
  • Darshan97 Avatar

    What am I supposed to do with answers that have the same number of highest common words with questions in it ?

  • Blind4Basics Avatar

    Same as anter69, but considering the number of tests, I concidere this an ISSUE, not just a suggestion!

    Needs lots and lots of tests.

    About anter69's suggestions:

    • the case info = ['this text', 'that text'] is already managed by the description with find among information the UNIQUE string that has the highest number of words in common with question.
    • the second one, info = ['text text', 'no text'] is already implicitly managed with the description too: the answer should be 'text text'. But that is not tested for now. you'll have to choose either to modify the description or add those type of tests.
    • anter69 Avatar

      Adding random tests seems a bit burdensome (if I want to make them meaningful), and I just don't want to spend much time on it... But if you have a (re)usable set of random tests, share with me and I will dump it in the test cases, as I can still edit the kata.

    • lechevalier Avatar

      If you add random tests, you should then describe what to do with two answers that have the same highest number of common words with question.

  • anter69 Avatar

    Suggestions:

    • add more (and preferrably random) tests
    • test for case insensitivity (currently not tested)
    • edge cases are not defined, e.g.:
      question = 'text'
      info = ['this text', 'that text']
      
      or:
      question = 'text'
      info = ['text text', 'no text']
      
  • ChristianECooper Avatar

    Nice kata!

    My only suggestion is for the parameters, I think you have them backwards, and trhey might be btter named as question and possible_answers or something similar. :)

    • Wittybit Avatar

      But please! If you will fix it - don't ever swap parameters when you call the function. It will break current solutions.

      Anyway - good, interesting kata =)

    • KH! Avatar

      thanks for those remarks, but i don't understand "i think you have them backwards" so explain please

    • anter69 Avatar

      Parameter names are now reversed in the "initial solution", so it corresponds with the description.

      I also updated the example test cases and the description a bit.

      Plus, I restructered the test cases to make it easier to add more questions/answers. Feel free to add (a lot) more...

      Cheers

      Suggestion marked resolved by anter69 8 years ago
  • KH! Avatar

    HI everyone , i hope u will like this brand-new kata!

    i'd also like if someone improves the look af my description & helps me find some intresting test cases

    always open to suggestion ; thenx in advance :)

    • GiacomoSorbi Avatar

      Cool, then I started rewording your description.

      Next steps are adding random test cases and deciding what happens when more replies have the same number of occurrences; I would pick the first one, discarding the note in the description in which you say "order does not matter", but you will be the judge here.

      Cheers :)