Skip to content

Instantly share code, notes, and snippets.

@wkta
Created March 3, 2014 22:41
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 wkta/9336185 to your computer and use it in GitHub Desktop.
Save wkta/9336185 to your computer and use it in GitHub Desktop.
#MonthOfCode - hello world
import random
graal = [104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100]
binf,bsup = min(graal),max(graal)
k = 0
while( k<len(graal) ):
attempt = list()
for i in xrange(len(graal)):
attempt.append( random.randint( binf, bsup))
if (graal[k] ==attempt[k]):
print ' '.join( [chr(code) for code in attempt] )
k+=1
@wkta
Copy link
Author

wkta commented Mar 3, 2014

screenshot available on twitter @spartangeek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment