Hot answers tagged

2 votes
Accepted

Vigenere-Struggling to understand why garbage values are being printed

If you run the code with key = "bbb" and plaintext ABC, the result is ciphertext:BACBDC. This is a mix of the properly coded BCD and the original ABC, printing alternatingly from each string. This ...
user avatar
  • 63.1k
1 vote

PSet4 - Filter (more) - Edge

So, now it is a lot shorter (thanks to the inspiration by Ayam Chan) and works fine. Am I allowed to publish the complete code? Or is that not appreciated? Greetz
user avatar
  • 88
1 vote
Accepted

PSet4 - Filter (more) - Edge

First of all, you should consider revise your code in order to group some of those for loops and reduce the number of lines. It will be more readable for you and for others. You have two separate ...
user avatar
  • 1,541
1 vote
Accepted

caesar store ascii value as int, in loop

You can just go ahead and treat it as an integer. If, for example, plaintext="bar", plaintext[0]=b=98, and you can just perform operations with it, such as plaintext[0]+1, which will yield 99.
user avatar
  • 1,415

Only top scored, non community-wiki answers of a minimum length are eligible