(self)
| 116 | return f"PZN-{self.pzn}" |
| 117 | |
| 118 | def calculate_checksum(self): |
| 119 | sum_ = sum(int(x) * int(y) for x, y in enumerate(self.pzn, start=2)) |
| 120 | checksum = sum_ % 11 |
| 121 | if checksum == 10: |
| 122 | raise BarcodeError("Checksum can not be 10 for PZN.") |
| 123 | |
| 124 | return checksum |
| 125 | |
| 126 | |
| 127 | class PZN8(PZN7): |