Created
March 3, 2014 22:41
-
-
Save wkta/9336185 to your computer and use it in GitHub Desktop.
#MonthOfCode - hello world
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
screenshot available on twitter @spartangeek