Ad
  • Default User Avatar

    I should avoid nested loops all together? This problem is more difficult than a kyu 5 problem. By the way, thanks for the reply.

  • Default User Avatar

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

  • Default User Avatar

    Damn, so I just wasted my time on this kata? :(
    I guess I'll have to rewrite some of the code...

  • Custom User Avatar

    Would someone please tell me why I kept getting this error? The code runs as requested perfectly on my Python 3.6.3 IDE as well as in Pythontutor.com. Thanks in advance.

    Traceback (most recent call last):
    File "main.py", line 6, in
    Test.assert_equals(get_sum(5,-1),14)
    File "/home/codewarrior/solution.py", line 22, in get_sum
    (a, b) = swap_variables(a, b)
    TypeError: 'tuple' object is not callable