Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
no comprendo muy bien lo que hicieste con el [number], pero creo que creaste un arreglo, ahí mismo en el return, con el valor de number?
I used the following testcases for Python:
Test.assert_equals(validate(79927398713), True)
Test.assert_equals(validate(79927398710), False)
Test.assert_equals(validate(79927398711), False)
Test.assert_equals(validate(79927398712), False)
Test.assert_equals(validate(79927398714), False)
Test.assert_equals(validate(2543), True)
Test.assert_equals(validate(2741), True)
Test.assert_equals(validate(2841), False)
I am a bit confused on submitting a solution using Test Driven Development.
I have used a list of credit card numbers from https://en.wikipedia.org/wiki/Luhn_algorithm, and have validated them with my code and they all pass accordingly.
Invalid: 79927398710, 79927398711, 79927398712, 79927398714, 79927398715, 79927398716, 79927398717, 79927398718, 79927398719
Valid: 79927398713
How can I go about implementing this in TDD form?
I currently have:
Test.assertEquals(validatecard("79927398713"), true);
Test.assertEquals(validatecard("79927398710"), false);