Skip to content

Instantly share code, notes, and snippets.

@meatcar
Created August 3, 2012 18:57
Show Gist options
  • Save meatcar/3250430 to your computer and use it in GitHub Desktop.
Save meatcar/3250430 to your computer and use it in GitHub Desktop.
manualy capitalize words
infile = open('test.txt', 'rt')
wordlist = []
while True:
line = infile.readline()
if not line:
break
answer = line.split('=')
wordlist.append([answer[0], answer[1][0:-1]])
for word in wordlist:
if input('Capitalize ' + word[0] + ": ") != word[1][0:-1]:
print('you are wrong, its ' + word[1])
else:
print('yay, you are right!')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment