Skip to content

Instantly share code, notes, and snippets.

@jbiason
Last active August 29, 2015 14:12
Show Gist options
  • Save jbiason/3eca98f9b2eba0e3829e to your computer and use it in GitHub Desktop.
Save jbiason/3eca98f9b2eba0e3829e to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""Beaker translator"""
def meep(word):
syllables = len(word) / 2
return 'meep' * syllables
def meepmeep(phrase):
words = []
for word in phrase.split(' '):
words.append(meep(word))
return ' '.join(words)
def main():
phrase = raw_input('Phrase: ')
print meepmeep(phrase)
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment