Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. import random
  2.  
  3. print("Enter Your Name | Ex: John S. Smith")
  4. full_name = raw_input('')
  5. name_list = full_name.split(" ") #Splits name into words by Spaces
  6.  
  7. #Each Part of the Name is put into its own List
  8. first_name = list(name_list[0])
  9. mid_initial = list(name_list[1])
  10. last_name = list(name_list[2])
  11.  
  12. #The Main Lists for Comparing
  13. List1 = ['A', 'a', 'D', 'd', 'G', 'g'] #1
  14. List2 = ['B', 'b', 'E', 'e', 'H', 'h'] #2
  15. List3 = ['C', 'c', 'F', 'f'] #3
  16. List4 = ['Z', 'z'] #4
  17. List5 = ['X', 'x', 'Y', 'y'] #5
  18. List6 = ['I', 'i', 'J', 'j'] #6
  19. ListSKIP = ['A', 'a', 'E', 'e', 'H', 'h', 'I', 'i', 'O', 'o', 'U', 'u', 'W', 'w', 'Y', 'y'] #skip
  20.  
  21. #List to Parse
  22. filteredList = list(last_name)
  23.  
  24. #Step1: Remove SKIP Characters from filteredList
  25. #Step2: Compare Lists 1 - 6 with matching Characters
  26. #Step3: Matching Characters are assigned a Number
  27. #Step4: The numbers stay in the same order as the characters in the word.
  28. #Ex: "A, B, C, D, Z" = "1 2 3 1 4"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement