| 
40
 | 
     1 # function for encrypting to a1z26 cause i'm lazy
 | 
| 
 | 
     2 def A1Z26_encrypt(cistring):
 | 
| 
 | 
     3     string = []
 | 
| 
 | 
     4     cistring = cistring.lower()
 | 
| 
 | 
     5     cistring = "".join(cistring.split())
 | 
| 
 | 
     6     for x in range(0, len(cistring)):
 | 
| 
 | 
     7         char = ord(cistring[x]) - 96
 | 
| 
 | 
     8         if char > 0 and char <= 26:
 | 
| 
 | 
     9             string.append(int(char)-1)
 | 
| 
 | 
    10     return(string)
 | 
| 
 | 
    11 
 | 
| 
 | 
    12 
 | 
| 
 | 
    13 # define variables
 | 
| 
 | 
    14 o = ["Avocados", "Bandanas", "Carrots", "Drums", "Elephants", "Flashlights",
 | 
| 
 | 
    15      "Grapes", "Highlighters", "Incentives", "Jacks", "Kangaroos", "Lemons",
 | 
| 
 | 
    16      "Muffins", "Ninjas", "Olives", "Pears", "Quizzes", "Raisins",
 | 
| 
 | 
    17      "Submarines", "Turnips", "Umbrellas", "Violas", "Watermelons", "X-Rays",
 | 
| 
 | 
    18      "Yards", "Zebras"]
 | 
| 
 | 
    19 a = ["Acidic", "Broke", "Confused", "Determined", "Exothermic", "Fragrant",
 | 
| 
 | 
    20      "Green", "Hilarious", "Insincere", "Juicy", "Keen", "Lovely", "Misty",
 | 
| 
 | 
    21      "New", "Orange", "Purple", "Quick", "Red", "Stoic", "Troubling",
 | 
| 
 | 
    22      "Underwhelmed", "Victorious", "Warm", "Xeric", "Young", "Zesty"]
 | 
| 
 | 
    23 s = ["Always", "Bravely", "Calmly", "Daringly", "Easily", "Fondly", "Gladly",
 | 
| 
 | 
    24      "Honestly", "Instantly", "Joyfully", "Kindly", "Loudly", "Magically",
 | 
| 
 | 
    25      "Neatly", "Openly", "Perfectly", "Quietly", "Rarely", "Safely",
 | 
| 
 | 
    26      "Tenderly", "Usually", "Victoriously", "Warmly", "Xerically", "Yearly",
 | 
| 
 | 
    27      "Zestfully"]
 | 
| 
 | 
    28 c = ["Award", "Bother", "Conduct", "Drive", "Evaluate", "Form", "Give", "Help",
 | 
| 
 | 
    29      "Inspect", "Jump", "Keep", "Lift", "Memorize", "Notice", "Officiate",
 | 
| 
 | 
    30      "Pursue", "Quiz", "Raise", "Switch", "Turn", "Underwhelm", "Vacate",
 | 
| 
 | 
    31      "Wish", "X-Ray", "Yield", "Zip"]
 | 
| 
 | 
    32 
 | 
| 
 | 
    33 # the actual start of the code
 | 
| 
 | 
    34 print("what is your peardeck code?: ")
 | 
| 
 | 
    35 i = input().lower()
 | 
| 
 | 
    36 ilist = A1Z26_encrypt(i)
 | 
| 
 | 
    37 try:
 | 
| 
 | 
    38     temp = a[ilist[0]]
 | 
| 
 | 
    39 except IndexError:
 | 
| 
 | 
    40     print("ERROR: Please input letters.")
 | 
| 
 | 
    41 except Exception:
 | 
| 
 | 
    42     print("ERROR: Unknown error occurred!")
 | 
| 
 | 
    43 if (len(i) == 6):
 | 
| 
 | 
    44     print(a[ilist[0]] + " ", end="")
 | 
| 
 | 
    45     print(o[ilist[1]] + " ", end="")
 | 
| 
 | 
    46     print(s[ilist[2]] + " ", end="")
 | 
| 
 | 
    47     print(c[ilist[3]] + " ", end="")
 | 
| 
 | 
    48     print(a[ilist[4]] + " ", end="")
 | 
| 
 | 
    49     print(o[ilist[5]], end="")
 | 
| 
 | 
    50 elif (len(i) == 5):
 | 
| 
 | 
    51     print(a[ilist[0]] + " ", end="")
 | 
| 
 | 
    52     print(o[ilist[1]] + " ", end="")
 | 
| 
 | 
    53     print(c[ilist[2]] + " ", end="")
 | 
| 
 | 
    54     print(a[ilist[3]] + " ", end="")
 | 
| 
 | 
    55     print(o[ilist[4]], end="")
 | 
| 
 | 
    56 else:
 | 
| 
 | 
    57     print("invalid input, exiting")
 | 
| 
 | 
    58     exit()
 |