Created
August 3, 2012 18:57
-
-
Save meatcar/3250430 to your computer and use it in GitHub Desktop.
manualy capitalize words
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
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