def main(): # Demonstration required by CodeHS original = "Hello World" print("Original:", original) encoded = encode(original) print("Encoded: ", encoded) decoded = decode(encoded) print("Decoded: ", decoded)
# Test with a more complex string test = "CodeHS 8.3.8 is fun!" print("\nTest original:", test) enc_test = encode(test) print("Test encoded:", enc_test) print("Test decoded:", decode(enc_test)) 8.3 8 create your own encoding codehs answers
# Example usage to test the code # This will print 'Ifmmp' because 'H'+1='I', 'e'+1='f', etc. print(encode("Hello")) def main(): # Demonstration required by CodeHS original
# Testing the functions shift = 3 plain_text = "Hello, World!" encoded = caesar_encode(plain_text, shift) decoded = caesar_decode(encoded, shift) original) encoded = encode(original) print("Encoded: "