|
|
Earl Stevens better known as E-40, (E-40 Fonzarelli or 40 Water)is a West Coast rapper has produced albums such as "In a Major Way," "Hall of Game" and "Element of Surprise."
# Prompt the user for the secret message secret_message = input("Enter a message to encode: ") # Initialize an empty string to store the encoded result encoded_message = "" # Iterate through each character in the original message for char in secret_message: # Get the ASCII value of the character ascii_value = ord(char) # Apply the custom encoding rule (Shift the ASCII value by 3) new_ascii_value = ascii_value + 3 # Convert the new ASCII value back into a character new_char = chr(new_ascii_value) # Append the encoded character to our result string encoded_message += new_char # Print the final encoded message print("Encoded message: " + encoded_message) Use code with caution. Code Walkthrough and Logic
Some students have successfully used a simple incremental mapping, such as assigning 10000 or similar binary strings to characters and spaces to fill the requirements efficiently. Understanding the Concept: Why Create Your Own Encoding? 8.3 8 create your own encoding codehs answers
| © 2000,2001,2002 ItsQuick Inc. All rights reserved |