hex_numbers = ['\x1b', '\x04', '\x15', '\x02', '\x5c', '\x18', '\x00']
result = ""
for hex_num in hex_numbers[:6]:
result += chr(ord(hex_num) ^ 0x6c)
print(result)
addition of characters to the result string will be valid as well |
==> |
python function to solve:
def solution(username, number):
password = []
for i in range(len(username)):
password.append(chr(ord(username[i]) + number))
return "".join(password)
usege:
print(solution("admin",3)) - dgplq |
==> |
num = 2
for i in range(2,20):
num *= i
print(num) |
==> |