Debugging – the process of detecting and removing errors.

Types of errors – syntax errors and semantic errors.

  • syntax error – error where a rule of the programming language is broken
  • semantic error – when the program doesn’t behave as intended


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.

All the errors were semantic errors. The code was correct syntactically, but the wrong items where used.

Error 1: needed to use TextBoxCiphertext, not TextBoxPlaintext.

Error 2: needed to use ciphertext for the “to” piece instead of the integer 5

Error 4: needed to return plaintext instead of ciphertext

Error 3: needed to return ciphertext instead of the PLAIN_ALPHABET

Error 5: needed to use plaintext instead of PLAIN_ALPHABET for the “to” piece