Skip to content

Instantly share code, notes, and snippets.

@cpressey
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cpressey/637f5b385fc387a043a6 to your computer and use it in GitHub Desktop.
Save cpressey/637f5b385fc387a043a6 to your computer and use it in GitHub Desktop.
Expensive Shoes
BUT HENCE ----- you'll need
++++ you'll say -----
---- SO HENCE they'll have
+++++ --- +
--- i'll have +
AND THEN +++ ++++
----- ++ ----
- BUT NOW AND NOW
++ - --
++ ---- SO NOW
-- +++ +++++
they'll say you'll have --
i'll say + ++++
--- AND HENCE they'll need
+++++ BUT THEN SO THEN
+++ - i'll need
#!/usr/bin/env python
import sys
import random
def main(argv):
COLUMN_A = ('BUT', 'AND', 'SO')
COLUMN_B = ('THEN', 'NOW', 'HENCE')
COLUMN_ZA = ("i'll", "you'll", "they'll")
COLUMN_ZB = ('have', 'need', 'say')
pairs = ["%s %s" % (a, b) for a in COLUMN_A for b in COLUMN_B] # 9
pairs_z = ["%s %s" % (a, b) for a in COLUMN_ZA for b in COLUMN_ZB] # 9
frabnabs = \
['-' * n for n in xrange(1, 6)] * 3 + \
['+' * n for n in xrange(1, 6)] * 3
total = pairs + pairs_z + frabnabs
random.shuffle(total)
while total:
some = total[:3]
total = total[3:]
print ' '.join(some)
if __name__ == '__main__':
main(sys.argv)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment