Created
March 17, 2019 12:33
-
-
Save khatabwedaa/aa8ff18de2d193e4d86ba6bea9aee550 to your computer and use it in GitHub Desktop.
This file contains 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
# This code for change the english letters to numbers | |
# Examples input letter a : output 1 , input letter z : output 26 | |
# Change Name To Numbers Function | |
def name_to_numbers(nam): | |
lowrance = nam.lower() | |
for i in lowrance: | |
if i == " ": | |
print(' | ' , end=" ") | |
else: | |
print(ord(i) - 96 , end=" ") | |
# Main Function | |
if __name__ == '__main__': | |
name = str(input('Enter Your Name: ')) | |
name_to_numbers(name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment