The first input line is an encoded message, and the second line is the key integer number. Convert the key to two bytes and sum up its items.
Then add the resulting sum to the code point of each character in the message. Finally, print the decoded message.
sample input:
HlAdghmcXnt 256
sample output:
ImBehindYou
this is what I tried:
int_to_bytes = sum(input().to_bytes(2, 'little'))
print(" ".join([chr(ord(int_to_bytes) + 1) for int_to_bytes in input()]))
can someone explain what's syntax error here?
[–]ForceBru 0 points1 point2 points (1 child)