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.
thank you for your help, using your example, I figured out where there was an error in the code and was finally able to solve it, as a result, the error was in a loop that multiplied two lists and gave incorrect values
I added one elif line where I mentioned mod==7 and number[8]=="X".
Hope it helps... I don't want to write the exact line. But it's a short line anyway...you'll make it :-)
For 3YC1DG6T7FY565964 the sum is 458, modulo is 4. for 5HVA1C6ZXPA702445 the modulo is 7. You should revise your code.
First example: translated "38314763768565964" =>
3 * 8 = 24
8 * 7 = 56
3 * 6 = 18
1 * 5 = 5
4 * 4 = 16
7 * 3 = 21
6 * 2 = 12
3 * 10 = 30
7 * 0 = 0
6 * 9 = 54
8 * 8 = 64
5 * 7 = 35
6 * 6 = 36
5 * 5 = 25
9 * 4 = 36
6 * 3 = 18
4 * 2 = 8
24+56+18+5+16+21+12+30+0+54+64+35+36+25+36+18+8 = 458
I'm having the same issue you had (only failing the first 3 tests). I recognize that each of these 3 VIN numbers have "X" as the checker digit, yet I still cannot figure out what I am doing wrong. Can you help explain to me how you were able to solve this?
I liked this kata a lot.
or one of the fixed tests 5HVA1C6ZXPA702445
modulus 11 is 10 and it must be valid number, but test said it must return False
3YC1DG6T7FY565964 for this vin modulus 11 is 9
test said that this one is valid
Can you post the VIN number? Did it happen on the Random Tests or Fixed Tests?
I had a strange problem, I even output the value for modulus 11 for verification, so, comparing the check and what the program output was strange, that is, modulus 11 was equal to 3, and in place of the 9th number there was a digit 2, that is, they are not equal and therefore the answer should be False, but it was written in the tests that it should be True