This file contains hidden or 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
engtoesp = { | |
"hello": "hola", | |
"coffee": "cafe", | |
"milk": "leche", | |
"sugar": "azucar", | |
"doggie": "perrito", | |
"kitty": "gatito", | |
"niece": "sobrina", | |
"sister": "hermana", | |
"auntie": "tia", |
This file contains hidden or 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
animals = [ | |
'alligator','baboon','chameleon','deer', | |
'eagle','falcon','gazelle','hippopotamous', | |
'ibis','jaguar','kookaburra','lemur', | |
'manatee','narwhal','octopus','penguin', | |
'quetzal','raccoon','salamander','tiger', | |
'unau','vervet','walrus','xenopoecilus', | |
'yabby','zebra' | |
] | |
k_list = [] |
This file contains hidden or 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
# Throwback MASH | |
# A note to my grader: I realized while typing in the children section that this isn't really a choose-your-own-adventure story. But it does have if-elif-else statements and input and lists. Plus I had fun making it. I hope you can find it in your heart to be nice in the grading =) | |
def inputcheck(entry,listn,fmt): | |
unique = 2 | |
valid = 5 | |
if fmt == 'str' : | |
for listi in listn : | |
if entry == listi : |
This file contains hidden or 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
def greetings(): | |
print '"no one ever expects the Spanish Inquisition"\n' | |
def txt_to_num(numstr): | |
# https://www.pydanny.com/why-doesnt-python-have-switch-case.html | |
switcher = { | |
'zero': 0, | |
'one': 1, | |
'two': 2, | |
'three': 3, |