Ad
  • Custom User Avatar

    No offense taken, now that you solved it, do you have a suggestion about how would it be clearer?

  • Default User Avatar

    I was able to figure it out eventually. I mean no offense, it's just not clear when you first read it and look at the examples. But I completed it.

  • Custom User Avatar

    What's the difference between 3 for the price of 2 and buy 3, pay 2 get 1 free? The examples are clear imho. For every 3 mangoes you buy, you only pay 2 and get 1 free.

  • Default User Avatar

    @Chrono79 It's just generally confusing and not well explained. I would consider re-writing the entire desription and making the examples more clearly match the description. It is still confusing.
    Like, is it 3 for the price of 2, or are there free mangoes involved or what? It's just too vague.

  • Custom User Avatar

    What's what you don't understand?

  • Default User Avatar

    Yeah I stared at it for five minutes before giving up and reading the comments. Even the 'examples' don't clarify much. I think I'll be skipping this kata.

  • Custom User Avatar

    Check again.

  • Custom User Avatar

    Yes, probably. Here they have all kind of "3 for 2", "the second at half price" and many more.

    I though of adding the $ sign to the examples, but I don't know if that would be better or not:

    mango(2, 3) ==> 6    # 2 mangoes for $3 = $6; no mango for free
    mango(3, 3) ==> 6    # 2 mangoes for $3 = $6; +1 mango for free
    mango(5, 3) ==> 12   # 4 mangoes for $3 = $12; +1 mango for free
    mango(9, 5) ==> 30   # 6 mangoes for $5 = $30; +3 mangoes for free
    

    Seeing the examples again, if you buy 2, you don't get one free, see the first example. Only if you grab 3, you get one of those free.

  • Custom User Avatar

    "Buy 2 mangoes get one free" is misleading too. One of those 2 is free? I think pay 2 and get one free is closer to what is asked. But because I'm not a native english speaker, I don't know what's the usual way of writing that. Is "3 for 2" really that strange?

  • Default User Avatar

    IMO it could fit into either of those levels. it's much easier than most level 5 katas.

  • Default User Avatar

    what kyu should it be? 6, 7?

  • Custom User Avatar

    Updated the description to be hopefully clearer:

    You can try to get a response once a day, thus you have n * 7 tries in total to find...

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution