A11 — Introduction to algorithms

Draw a smiley face with a turtle and create a flowchart program.

Due Nov 11, 2026

Estimated time to complete (just the assignment, excluding the prep materials): 60–90 minutes.

Prep materials: Week 11: Introduction to algorithms

What to do

For this assignment, you will need to use Logo Blocks and FlowRun.

Submit your work to Assignment 11 Submission on Brightspace:

  • One .xml file from Logo Blocks (use the light-green save button in the left bottom corner to save the XML code).
  • One .lgo file from Logo Blocks (use the light-green save button in the right bottom corner to save the Logo code).
  • One .flowrun file from FlowRun (use the yellow save button at the top to save the FlowRun code).
  • One .txt or .md file or Brightspace response with your answers to the questions in the assignment.

Part 1: Smiley face

  1. Recover your smiley face from class (or write from scratch: write instructions for drawing a smiley face on a piece of paper with a pen) and include the instructions in your response.

  2. Create a program in Logo Blocks that follows your instructions precisely. (You might need to use the command draw circle from the Intermediate/Draw menu.)

    • If you are not able to find a correspondence between your instructions and the Logo Blocks commands, try to break down the steps into smaller parts.
    • If the outcome does not match your expectations (for example, the turtle leaves a line that shouldn’t be there), fix your instructions and the program until it does.
    • Document all the changes you made to the instructions and why (include that into your response).
    • Save the program as smiley.xml and smiley.lgo.
    • Include the updated instructions in your response.

Part 2: Flowchart

Create a flowchart in FlowRun to do the following:

  1. Ask the user for an integer number.

  2. Ask the user for a second integer number that is larger than the first number.

  3. If the second number is not larger than the first number, print “Error: the second number should have been larger than the first one” and end the program.

  4. Otherwise (if the second number is larger than the first number):

    1. Ask the user for a third integer number between the first and second numbers (inclusive).

    2. If the third number is not between the first and second numbers, print “Error: the third number should have been between the first and second numbers.” and end the program.

    3. Otherwise:

      1. Compute the median of the two numbers (i.e., the number that lays in the middle between the two numbers).

      2. Print “Median:” without New line checkbox.

      3. Print the median value (with New line checkbox).

      4. End the program.

Save the program as median.flowrun and include it in your submission.

Grading

Part 1 is graded for completion and Part 2 is graded for correctness.