Ładowanie zadania…
In binary protocols, a checksum helps detect whether data was damaged during transfer. Given a list packet, the last byte is already included in the total as the checksum byte. Return True if the sum of all bytes modulo 256 is equal to 0. Otherwise, return False.
[10, 20, 226]True[0]True[1, 2, 3]Falsedef checksum_ok(packet):
Zaloguj się, aby zobaczyć historię rozwiązań
Zaloguj sięZaloguj się, aby korzystać z Mentora AI
Zaloguj sięThey run when you press "Submit" — your whole solution is checked against them so you can't hard-code answers for the visible cases.