Created
May 15, 2020 19:15
-
-
Save X-88/cffeeb10f7ff6b11c2e1340caba8d40c to your computer and use it in GitHub Desktop.
String to Decimal & Hexa Decimal
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
from os import system | |
system("clear") | |
StrList = "0123456789ABCDEF" | |
msg = "Apps: String To Hex\nCoded by: Zephio\nLang: Python 3.xx" | |
spr = "===========================" | |
print(spr) | |
print(msg) | |
print(spr) | |
inp = input("Enter Text Here: ") | |
print(spr) | |
for x in inp: | |
y = ord(x) | |
z = str(y // 16) + StrList[y % 16] | |
print("Result: " + x, " ", y, " ", z) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment