Created
November 14, 2017 00:44
-
-
Save bryant/a6d4236c336f2bae98979c8e6fcec428 to your computer and use it in GitHub Desktop.
I needed to learn the phoenetic alphabet.
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
from random import choice | |
from string import lowercase | |
from datetime import datetime | |
answers = [ | |
"alpha", | |
"bravo", | |
"charlie", | |
"delta", | |
"echo", | |
"foxtrot", | |
"golf", | |
"hotel", | |
"india", | |
"juliett", | |
"kilo", | |
"lima", | |
"mike", | |
"november", | |
"oscar", | |
"papa", | |
"quebec", | |
"romeo", | |
"sierra", | |
"tango", | |
"uniform", | |
"victor", | |
"whiskey", | |
"xray", | |
"yankee", | |
"zulu", | |
] | |
answers = zip(lowercase, answers) | |
while True: | |
letter, phoenetic = choice(answers) | |
if raw_input(datetime.now().isoformat() + " " + letter + "? ").lower() != phoenetic: | |
print "Wrong. Expected " + phoenetic | |
else: | |
print "Correct." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment