Ad
  • Custom User Avatar

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

  • Custom User Avatar

    You need to format your code properly with 4 backticks and the language
    ````language
    code here
    ````
    for it to be comprehensible. Copy pasting your code prints on one line and from the looks of it its python, and knowing the indentation is extremely important.

    It seems like you are trying to parse the hex number, converting every 2 "digits" into a binary number, padding it with zeros to fit the 8 bit sized segment, and attaching "\n" to the end until youve done this for every pair of digits in the hex number.

    The prompt wants you to convert the ENTIRE hex number to binary then pad, not every 2 digits. Not sure if I can say more without giving away the answer.

  • Custom User Avatar

    just gotta hardcode that specific case

  • Custom User Avatar

    Kata is still unsolvable at time of this comment due to this issue.

  • Custom User Avatar
  • Custom User Avatar

    I want to be like you when I grow up

  • Default User Avatar
  • Default User Avatar

    The expected value for Douglas Adam's description in the first test needs updating:

    -> should now be: "English author and humourist (1952–2001)" as per the "en" value in JSON response now.

    Can you please fix that so we can submit?

    (All other test cases are good and passing though. I'm not getting the issue mentioned by Iron Fingers, below.)

  • Default User Avatar

    Yep, the contents of wiki are very different and tests are not passing. Too bad, because this kata is very real-life unlike most of them here.

  • Custom User Avatar

    we should have a downvote menu

  • Custom User Avatar

    Hi Terranovafel, Welcome to Codewars!

    Looking at your attempted solution, you basically have the right approach.

    However, note that the input object is passed as an argument to a function (named total_bytes in this kata) and you should return the result from there.

    You can also read here on how to write a solution: https://docs.codewars.com/training/training-example#writing-a-solution

    Initial setup:

    # return the total byte size of the object. 
    def total_bytes(obj):
        pass
    
  • Default User Avatar

    The instructions read as if it is going to give me an object to test the size of, it does not. How am I suppose to solve this without the objects or input of the objects. I wrote a script that will give you the bytes of any object. I tried converting all the example objects into bytes. Tried putting the bytes as an input, Where do i get the objects it says it will provide?

  • Custom User Avatar
  • Custom User Avatar

    fixed in new fork

  • Custom User Avatar

    👍

  • Loading more items...