Skip to content

Instantly share code, notes, and snippets.

@igorgue
Created July 24, 2009 16:41
Show Gist options
  • Save igorgue/154399 to your computer and use it in GitHub Desktop.
Save igorgue/154399 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
from sys import argv
def hopp(number):
if (number % 3) == 0 and (number % 5) == 0:
print 'Hop'
elif number % 3 == 0:
print 'Hoppity'
elif number % 5 == 0:
print 'Hophop'
if __name__ == '__main__':
map(hopp, range(1, int(argv[1]) + 1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment