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