Ad
  • Custom User Avatar

    This is so cool, I love it.

  • Custom User Avatar

    nice use of strings.TrimRight

  • Custom User Avatar

    Still I would say that confusing stack trace is an issue with tests.

  • Custom User Avatar

    Thanks rowcased for your reply.
    I just attempted once again and this time I passed all the tests. :)
    I dont know about the initial value because the test values were not visible.
    Have a good day.

  • Default User Avatar

    The last line of your error message tells you the most. Print your inputs to see what you're dealing with there, probably an empty container... Do you know about the initial value referrred to about the reduce function?

  • Custom User Avatar

    I passed every other test, but only the last small test sends this eexception:
    Is it my error?
    Unexpected exception raised

    Traceback (most recent call last):
    File "/runner/frameworks/python/cw-2.py", line 111, in wrapper
    func()
    File "main.py", line 45, in small_tests
    test.assert_equals(check(prime_factors(number), number), True)
    File "main.py", line 34, in check
    actual = reduce(lambda x, y: x*y, [i ** j for i, j in zip(primes, power)])
    TypeError: reduce() of empty sequence with no initial value

  • Custom User Avatar

    Brilliant. Good job!

  • Custom User Avatar

    Good solution!
    I agree that the spacing must have been more generous.