From 09fd746bbca95e11ab91631bf6ae0cd45ff43198 Mon Sep 17 00:00:00 2001 From: Cory Date: Tue, 7 May 2024 12:16:03 -0400 Subject: [PATCH] Commpleted checkpoint 1. I created a function called numerify that takes an string and outputs the numeric values of the bytes that represent that string with UTF-08 encoding. --- ccipher.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ccipher.py b/ccipher.py index 4434c1c..07d9083 100644 --- a/ccipher.py +++ b/ccipher.py @@ -16,4 +16,12 @@ hex_lst=[] for item in encoded_lst: hex_lst.append(list(item)[0]) print("The hex values associated with those bytes is:") -print(hex_lst) \ No newline at end of file +print(hex_lst) + +# Checkpoint 1 +def numerify(message): + hex_values=[] + for item in message: + hex_values.append(item.encode()[0]) + return hex_values +print(numerify('abc')) \ No newline at end of file