Answer the following question:
1. For each of the 5 bugs in the Caesar Cipher app, explain what the bug was, how to fix it, and the type of error (semantic or syntax). If you wish, you can take a picture of your corrected blocks and then annotate it to identify and describe the bugs you fixed.
Answer
- Error 1 The Decrypt script would return the ciphertext instead of the plaintext. In order to circumvent this problem I set the return value to plaintext syntax
- Error 2 CaesarEncrypt was returning the parts of the alphabet instead of ciphertext so I changed the return value to ciphertext. syntax
- Error 3 CaesarEncrypt was not returning numbers, so I changed the alphabet setting to include uppercase and number settings. I also had to change how much of a shift was to occur
- Error 4 decrypt button returning error if less than the length of five. the decrpyt function was only set for a length of 5 instead of the length of the ciphertext. Set the length of the for loop to the length of ciphertext. Semantic
- Error 5 The function was looping through the whole alphabet instead of the length of the text being inputted to the function. the fix was to change the loop to just going the length of plaintext. syntax