I have a problem with the keyword from vigenere. The password does not want to wrap around the text like it should. The first time it works, after that it makes mistakes.. Here is what check50 prints:
:( encrypts "world, say hello!" as "xoqmd, rby gflkp!" using "baz" as keyword \ expected output, but not "xoqmj, yfz gflkp!\n"
:( encrypts "BaRFoo" as "CaQGon" using "BaZ" as keyword \ expected output, but not "CaQ3un\n"
:( encrypts "BARFOO" as "CAQGON" using "BAZ" as keyword \ expected output, but not "CAQ3GV\n"
I tried to make a nested for loops. First a for loop to loop through the sentence and the second to loop through the key.
How can I make the keyword/password loop in the right way through the text?