Created
April 23, 2024 17:40
-
-
Save Lenochxd/1d7214ab12a010e4d897d0d21b6c66b7 to your computer and use it in GitHub Desktop.
convert alphabet to cuneiform or vice versa using python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alphabet = 'abcdefghijklmnopqrstufwxyz' | |
cuneiform = 'π»ππππΌπ£πππππππ ππΈπ¬ππ²πΌπ¦πππΌπ½π¨π£' | |
print("a: from alphabet to cuneiform.") | |
print("c: from cuneiform to normal text") | |
choice = input("Enter your choice (a/c): ").replace(' ', '') | |
if choice == 'a' or choice == '': | |
text = input("Enter text to convert to cuneiform: ") | |
converted_text = "" | |
for char in text: | |
if char in alphabet: | |
index = alphabet.index(char) | |
converted_text += cuneiform[index] | |
else: | |
converted_text += char | |
print("Converted text:", converted_text) | |
elif choice == 'c': | |
text = input("Enter text to convert from cuneiform: ") | |
converted_text = "" | |
for char in text: | |
if char in cuneiform: | |
index = cuneiform.index(char) | |
converted_text += alphabet[index] | |
else: | |
converted_text += char | |
print("Converted text:", converted_text) | |
else: | |
print("Invalid choice. Please enter 'a' or 'c'.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment