Earn extra honor and gain new allies!
Honor is earned for each new codewarrior who joins.
Learn more
  • Hi mouloud, these two updates have now been done. Also, I put in the new description; hope that looks okay to you.

  • Clever on the walrus operator

  • Hi rowcased, can you take a look at this discourse page and change the tests in your C translation accordingly (that is: add an edge case tester( 17, 17, false ); and update the random test generator so that in 10% of the cases a==b)?

  • fixed, thanks

  • you cannot access an index of an empty string

  • If you have some running variable cast as int and you want to add n % 10 when n is long then you need to cast the calculation to int as such: (int)(n % 2), meanwhile you don't need to do that if your running variable is set to long. still, because the function takes in a long and returns an int, at some point you need to make this transition correctly.

  • Yes, but it's not different enough if we can gently touch up the code we used from ROT13 to pass ROT47. Also, what if the next person wants to do ROT27, or ROT52, or, or ROT100, or ROT128? They would all be no more useful, I'm afraid.

  • fixed

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

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

  • Hi,

    The input string will always follow the structure below: 'a ( b + c )'

    ...but 'a ( b - c )' too => ?

    • your tests are still built the wrong way:
      • don't put anything in the preloaded section
      • avoid those pop(0) things, build the proper data structure to make all the tests in a loop, meaning:
    TESTS = [
      (messageDescribe, [(input, expected), (...,...), ...]),
      (messageDescribe, [(input, expected), (...,...), ...]),
      ...
    ]
    
    • This is typically the kind of kata that doesn't pass the beta phase anymore: the task is a small subset of a larger task/problem which makes the solution more a hack than anything, this hack becoming useless as soon as you try to generalize the problem. Hence This isn't considered a good idea for a kata, these days.

    cheers

  • def longest_repetition(chars):
        
        # your code here where you calculate
        #   1) the char  (str)
        #   2) its count (int)
        
        return char, count
    
  • Removed trailing whitespace

  • The input string will always follow the structure below:

    'a ( b + c )'

    Random tests have a trailing whitespace.

  • Loading more items...