Pset 2 Vigenere - getting this error -:( encrypts "BaRFoo" as "CaQGon" using "BaZ" as keyword \ expected output, but not "CaQGoh\n" Seems that it only happens when it's an upper case key letter and a lower plaintext. I'm stumped, haven't seen this anywhere else. What/how can you get the code to except that condition?

1 Answer 1


You've already diagnosed the problem. I'm sure that your code checks whether the plain text is upper or lower case. But are you also checking the key? It is a very common error that people will treat both the plaintext and the key chars as the same case when they should be checking the case of both letters. In other words, there are 4 possibilities, not just 2. That particular check50 test is designed to snag this exact issue.

If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)

  • Figured it out after about 10 different variations. ..
    – uddane
    Feb 12, 2016 at 23:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .