This is an example of a run of a program that demonstrates some error handling of different types of bad user input.
% python cryptoquote.py |*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*| Welcome to Cryptoqote I'll print out a quote I've encrypted using a single letter substitution cipher. See if you can decrypt it, one letter at a time. Enter 'quit' to exit the game before solving. Good Luck! |*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*| ........................................ PUZZLE: lncpw re t eytgxyc ebrjo graygxyc ---------------- YOUR SOLUTION: lncpw re t eytgxyc ebrjo graygxyc ........................................ From which letter in puzzle string? q Hey, q isn't in the puzzle...try again From which letter in puzzle string? ll Hey, 'll' isn't a letter, try again... From which letter in puzzle string? 5 Hey, '5' isn't a letter, try again... From which letter in puzzle string? u Hey, u isn't in the puzzle...try again From which letter in puzzle string? e To which letter in solution string? o ........................................ PUZZLE: lncpw re t eytgxyc ebrjo graygxyc ---------------- YOUR SOLUTION: lncpw rO t Oytgxyc Obrjo graygxyc ........................................ From which letter in puzzle string? quit Sorry you are quiting. Try again some other time. Here is the puzzle answer: birds of a feather flock togetherReturn to Lab 07