Created
October 15, 2015 18:06
-
-
Save jorgeavaldez/61b31a6cd2d1857e0041 to your computer and use it in GitHub Desktop.
input
This file contains 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
#!/usr/bin/env python | |
import random | |
f = open('valin.txt', 'w') | |
letters = 'abcdefghijklmnopqrstuvwxyz' | |
capLetters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
ssize = random.randint(0, 90) | |
inputsize = 1000 #random.randint(0, 1000) | |
sentenceCount = 0 | |
iscap = False | |
for i in range(inputsize): | |
word = '' | |
if sentenceCount is 10: | |
f.write('.\n') | |
iscap = True | |
for j in range(ssize): | |
if iscap: | |
word += random.choice(capLetters) | |
iscap = False | |
sentenceCount = 0 | |
else: | |
word += random.choice(letters) | |
f.write(' ' + word) | |
ssize = random.randint(0, 50) | |
sentenceCount += 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment