function checksum(str) local sum = 0 for i = 1, #str do sum = sum + string.byte(str, i) end return sum % 256 end print("Checksum of 'Hello' is:", checksum('Hello'))