Geometric drawing

06 Sep 2022 - 14:43 | Version 1 |

Objectives

  1. Learn to use repetition
  2. Learn to use variables
  3. Reinforce selection skills
  4. Reinforce reading from the brick

Assignment

  1. Create a clean program that will "draw" a 3, 4, or 5 sided figure (with even sides) based on the button from the brick.
    1. If the left button is pressed, draw a triangle (60 degree angle)
    2. If the middle button is pressed, draw a square (90 degree angle)
    3. If the right button is pressed, draw a five sided polygon (approximately 108 degree angle)
  2. Additional requirements
    1. You should use a count controlled loop
    2. You must use at least two variables.
    3. Inside the selection you can only have variables blocks (only one is optimal but not required). No repetition or arithmetic blocks inside the selection
    4. You may only have two instances of motor blocks

Submission instructions

  1. Due date is found on Canvas
  2. Each person should create a pdf document that contains the following information
    1. Your name
    2. Your partner's name
    3. A brief description of what you did
    4. A brief description of what your partner did
    5. How your team improved over any mistakes made last time
    6. Indicate which hints (if any) your team used
    7. How well you achieve each objective
  3. Submission:
    1. Team member A submits the team's code and his/her pdf document in one zip folder.
    2. Team member B submits his/her pdf document (does not need to be zip'ed)

Hints

  1. The same thing about accuracy in the first lab applies to this one! There is not objective about being accurate!
  2. I can set a variable but using a variable is a problem
  3. Questions about the math should be asked in class. This is not one of the objectives of the assignment! So ask if you need some help on the arithmetic!

Challenges

  1. Make your program very accurate
  2. Have your program move forward and then draw the figure based on a color seen. Let the color pick the number of sides.
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback
This website is using cookies. More info. That's Fine