Turtle Challenge 2024-2025

When completing your code challenges keep in mind the four characteristics of quality code…

  1. Functional – Accomplishes it’s task every time.
  2. Readable – Easy for a human to read and edit.
  3. Efficient – Executes quickly without unnecessary steps.
  4. Short – Uses the fewest lines of code.

Or put another way…

  1. Does it work? Your code should meet all of the requirements and work in every situation.
  2.  Is it understandable? Your code should be easy for a human to read and understand.
  3. Is it fast? You code should execute and finish as quickly as possible.
  4. Is it short? Your code should be as few line of code as possible.

Submit Your Turtle Challenges here. Please make sure your challenge meets all of the requirements before submitting. Also please make sure your app is titled “Turtle #__” to make it extra clear which challenge you have completed.

  1. Draw Square – Draw a single square in front of and to the right of the turtle (image).
    • Only use moveForward(),  turnLeft()
    • No loops, No functions, No parameters.
  2. Draw Square – Draw a single square in front of and to the right of the turtle (image)
  3. Draw Square – Draw a single square in front of and to the right of the turtle (image)
  4. Draw Square – Draw a single square in front of and to the right of the turtle (image)
  5. 2×2 Grid – Draw a two by two grid in front of and to the right of the turtle (image).
    • Only use moveForward(),  turnLeft()
    • No loops, No functions, No parameters.
  6. 2×2 Grid – Draw a two by two grid in front of and to the right of the turtle (image).
    • Only use move(), penUp(), penDown()
    • No loops, No functions.
    • You can use “parameters
    • Must be less than 15 lines of code.
  7. 2×2 Grid – Draw a two by two grid in front of and to the right of the turtle (image).
    • Only use moveForward(),  turnLeft()
    • No loops, No parameters.
    • You can use “functions
    • Must be less than 30 lines of code
  8. 2×2 Grid – Draw a two by two grid in front of and to the right of the turtle (image).
    • Only use moveForward(), turnLeft()
    • No functions, No parameters.
    • You can use “For Loops” (You can put loops inside of other loops, just make sure each loop uses different letters: i, j, k, etc)
    • Must be less than than 20 lines of code.
  9. 3×3 Grid – Draw a three by three grid in front of and to the right of the turtle.
    • Only use moveForward(), turnLeft()
    • No functions, No loops, No parameters.
    • Use less than 55 lines of code (Extra credit if less than 45 lines)
  10. 3×3 Grid – Draw a three by three grid in front of and to the right of the turtle.
    • Only use move(), penUp(), penDown()
    • No loops, No functions.
    • You can use “parameters” (example: move(50,25) )
    • Use less than 25 lines of code (Extra credit if less than 15 lines)
  11. 3×3 Grid – Draw a three by three grid in front of and to the right of the turtle (image).
    • Only use moveForward(), turnLeft()
    • No loops, No parameters
    • You can use “Functions
    • Use less than 35 lines of code (Extra extra credit if less than 20 lines of code).
  12. 3×3 Grid – Draw a three by three grid in front of and to the right of the turtle.
    • Only use moveForward(), turnLeft()
    • No functions, No parameters.
    • You can use “For Loops
    • Use less than 35 lines of code (Extra credit if less than 20 lines)
  13. Draw A Polygon – Write a function drawRegularPolygon(numberOfSides, sideLength) that draws a regular polygon with a given number of sides and a given side length.
  14. Draw Square Grid – Write a function drawSquareGrid(unitSize,rows,columns) that draws a grid of squares in front of and to the right of the turtle where each little square has a side length of “unitSize” and the grid is “rows” units tall and “columns” units wide. The turtle should end at the position and orientation where it started. View Example Code.
  15. Draw a triangle inside a rectangle – Write a function drawTriangleInRectangle(width, height) that draws a rectangle with a base length of “width” and a height of “height”. This should all be draw in front of, and to the right of, the turtle. The turtle should end where is began. You may use whatever commands or functions that you would like. View Example (click view code).