CREATE: Now it's time to show off your skills! Use what you've learned about refactoring to edit the code in the editor! This is an example of a program a student wrote in a previous lesson.

  1. Find repetitive blocks of code and write at least one function that your could use instead.
  2. Use at least one loop in your program (inside your function or out).
  3. Use comments to clarify the purpose behind each section of code.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)