Skip to content

Missed inv(checksum) #456

Closed
Closed
@seriyvolk83

Description

@seriyvolk83

return str(_multiplication_table[checksum(str(number) + '0')].index(0))

At the end of the calculation of the new checksum, you need to apply inv(c) function (see https://en.wikipedia.org/wiki/Verhoeff_algorithm )

inv = [0, 4, 3, 2, 1, 5, 6, 7, 8, 9]

Write unit tests please.

Check sum for 0241144346 -> 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions