Ad
  • Default User Avatar

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

  • Custom User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

    def add_binary(a,b):
    #your code here
    sum = a + b
    answer = ""
    while sum != 0:
    part = str(sum%2)
    answer += part
    sum = int(sum/2)
    return answer[::-1]

    My code is able to solve all the fixed cases and half of the random cases. What is wrong with the code. Can anyone help Thanks

  • Default User Avatar

    I tried my code in an editor, and it works just fine, but when I try it here it comes back with:
    Fixture.cs(38,29): error CS0103: The name 'Kata' does not exist in the current context
    Fixture.cs(44,33): error CS0103: The name 'Kata' does not exist in the current context
    Fixture.cs(50,34): error CS0103: The name 'Kata' does not exist in the current context
    Fixture.cs(30,49): error CS0103: The name 'Kata' does not exist in the current context

    I don't have 'Kata' anywhere in my code...
    Any suggestions?

  • Default User Avatar

    what will be the test case which will return None as a result.
    I have tried with various options.. and it wroked.. and when i am running the sample test cases.. its failing.
    Also tried using None keyword.. but it fails as other than integer (be it + or -) is not allowed (NoneType not defined).

    Please share one case which expects the result as None.

  • Default User Avatar

    The description should specify that the numbers are non-negative integers. The solution to handle floating point and signed integer numbers is more complex, and not covered in the test cases.

  • Default User Avatar

    Test case for negative numbers should be included