Ad
  • Custom User Avatar

    Fixed in this fork

    • Corrected the test message.

    • Increased the number of random tests.

    • Adjusted the random values to balance the probabilities of True and False results happening in the random test (previously ~87% False).

    • Amended language agnosticism in the description

  • Custom User Avatar

    My solution may be flawed, but the tests are as well. See the error messages from the test logs (example from above):

    Need 1966 reds, 1284 greens and 1881 blues.
    Got  2595 reds, 2535 greens and 3705 blues.
    True should equal False
    

    "need" < "got" for all colors, still True should equal False ?!

  • Custom User Avatar

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

  • Custom User Avatar

    Something occasionally wrong with Python tests. Examples:

    Log
    input: [['417e73', '413213', 'cc8592', '357d2c', '5722b8'], ['f64387', 'd9264d', 'f81e3f', '622dc5', '094f59'], ['82f59d', 'aeb41f', '5319e6', 'ad16d8', '7255b2']] 2595 2535 3705
    Need 1966 reds, 1284 greens and 1881 blues. Got 2595 reds, 2535 greens and 3705 blues.: True should equal False
    
    Log
    input: [['74d82c', '444817', 'b86e00', '9831bb', '3e767e'], ['0c2d81', 'a0a8f1', '881f29', '870dca', '1d8082']] 1530 1470 2060
    Need 1054 reds, 950 greens and 1123 blues. Got 1530 reds, 1470 greens and 2060 blues.: True should equal False
    
    Log
    input: [['7e8c1e', 'eedbce'], ['9e0130', 'bf8f89'], ['970b13', '7d4396'], ['87ca9d', 'be7bde'], ['5a2b97', 'cd98b4'], ['d163d2', 'd7abbb']] 2436 1488 2676
    Need 2033 reds, 1371 greens and 1697 blues. Got 2436 reds, 1488 greens and 2676 blues.: True should equal False
    
  • Custom User Avatar

    Link to rank assessment breakdown is https://www.codewars.com/api/v1/code-challenges/6277a3342c28814667504250/assessed-ranks
    Current state is: 10 x 7kyu, 10 x 6kyu, 1 x 5 kyu.

  • Custom User Avatar

    Thank you! I add it right now!

  • Custom User Avatar

    Thank you, now it seems obvious indeed !

    I have added a suggestion to add an example to make it a bit clearer if some other people also have trouble understanding this.

  • Custom User Avatar

    I think the link between color codes and units of ink needed would be a bit clearer with one more example. I suggest something like:

    A pixel with the color code 'fefdfc' need 1 unit of Red, 2 units of Green and 3 units of Blue.
    A pixel with the color code '00ff01' need 255 units of Red, 0 units of Green and 254 units of Blue.

  • Custom User Avatar

    It's in hexa. FF means 255 it's the max, FE means 254 its FF minus 1.

  • Custom User Avatar

    I am having trouble understanding the link between the color codes and the units of ink used. Could you help me with that ?

  • Custom User Avatar
  • Custom User Avatar

    Thank you! I just made the edit. Can you check if it's ok?

  • Custom User Avatar

    errr, actually, the problem below hasn't been handled properly. You have to replace all the 256 in the random tests by 255 (because you use randint instead of randrange)

    Cheers

  • Custom User Avatar
  • Custom User Avatar

    True but I don't want to overcomplicate it. That may be a cool other kata to make.

  • Loading more items...