Skip to content

Instantly share code, notes, and snippets.

@khatabwedaa
Created March 17, 2019 12:33
Show Gist options
  • Save khatabwedaa/aa8ff18de2d193e4d86ba6bea9aee550 to your computer and use it in GitHub Desktop.
Save khatabwedaa/aa8ff18de2d193e4d86ba6bea9aee550 to your computer and use it in GitHub Desktop.
# 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