Skip to content

Instantly share code, notes, and snippets.

View meggangreen's full-sized avatar

Meggan G meggangreen

View GitHub Profile
@meggangreen
meggangreen / HB-Prework-4.py
Created September 27, 2017 17:04
green_translator.py created by meggangreen - https://repl.it/Li9Z/2
engtoesp = {
"hello": "hola",
"coffee": "cafe",
"milk": "leche",
"sugar": "azucar",
"doggie": "perrito",
"kitty": "gatito",
"niece": "sobrina",
"sister": "hermana",
"auntie": "tia",
@meggangreen
meggangreen / HB-Prework-3.py
Last active September 23, 2017 22:45
green_animals.py created by meggangreen - https://repl.it/L65S/2
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 = []
@meggangreen
meggangreen / HB-Prework-2.py
Last active September 22, 2017 21:26
HB-Prework-2.py created by meggangreen - https://repl.it/L2Rw/34
# 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 :
@meggangreen
meggangreen / HB-Prework-1.py
Last active September 20, 2017 04:33
HB-Prework-1.py created by meggangreen - https://repl.it/LUvV/10
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,