Ad
  • Custom User Avatar

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

  • Custom User Avatar

    Really sorry, I didn't know that I had tried to attempt this kata a long period back.
    That code was mine actually :/
    My bad!

    Thanks for the reply!

  • Custom User Avatar

    Hi!
    The author has given the following code in the object constructor in the Python Solution's preloaded code:

    try:
      # parse the string
    except Exception:
      raise BaseException("Error occured while parsing version!")
    

    Now my solution works for all the fixed tests, however Test 7 Exception Calls is just not passing :c
    I'm handling the rollback error as well
    But it's stopping at the error I've just written above in the code.

    What could be the issue?

    P.S. I'm getting this error:

    Traceback (most recent call last):
      File "/workspace/default/solution.py", line 14, in __init__
        self.maj = int(v[0])
                   ^^^^^^^^^
    ValueError: invalid literal for int() with base 10: 'a'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/workspace/default/tests.py", line 4, in <module>
        @test.describe("Sample tests")
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/workspace/default/.venv/lib/python3.11/site-packages/codewars_test/test_framework.py", line 112, in wrapper
        func()
      File "/workspace/default/tests.py", line 50, in sample_tests
        @test.it("Exception calls")
         ^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/workspace/default/.venv/lib/python3.11/site-packages/codewars_test/test_framework.py", line 112, in wrapper
        func()
      File "/workspace/default/tests.py", line 53, in it_7
        VersionManager("a.b.c")
      File "/workspace/default/solution.py", line 20, in __init__
        raise BaseException("Error occured while parsing version!")
    BaseException: Error occured while parsing version!
    

    I'd appreciate your help!

  • Custom User Avatar

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

  • Custom User Avatar

    It was nice practicing my recursion skills after long C:
    Nice kata!

  • Custom User Avatar

    Nice kata! I'm getting started with recursions and this kata was a good experience practicing that + the concept of generators in Python :)

  • Custom User Avatar

    Gotta say calculating the transmission rate was the toughest part of the problem for me!
    Nice kata!!

  • Custom User Avatar

    Thanks for sparing your time for letting know your thoughts!
    I shall be definitely focusing on all the points you had mentioned from the next turn!
    Thanks again!

  • Custom User Avatar

    Ah! Sorry my friend, I hadn't attempted the above kata that you have shared,
    I made this kata for fun, for it's my first one :p
    The same problem was in my school assignment, so I thought to just have it here, to compete with my friends

  • Custom User Avatar

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