Geometric drawing
Objectives
- Learn to use repetition
- Learn to use variables
- Reinforce selection skills
- Reinforce reading from the brick
Assignment
- Create a clean program that will "draw" a 3, 4, or 5 sided figure (with even sides) based on the button from the brick.
- If the left button is pressed, draw a triangle (60 degree angle)
- If the middle button is pressed, draw a square (90 degree angle)
- If the right button is pressed, draw a five sided polygon (approximately 108 degree angle)
- Additional requirements
- You should use a count controlled loop
- You must use at least two variables.
- Inside the selection you can only have variables blocks (only one is optimal but not required). No repetition or arithmetic blocks inside the selection
- You may only have two instances of motor blocks
Submission instructions
- Due date is found on Canvas
- Create a pdf document that contains the following information
- Your name
- A brief description of what you did
- How you improved over any mistakes made last time
- Indicate which hints (if any) you used
- How well you achieve each objective
- Submission:
- Place code and pdf file into an empty zip folder and submit it.
Hints
- The same thing about accuracy in the first lab applies to this one! There is not objective about being accurate!
- I can set a variable but using a variable is a problem
- 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
- Make your program very accurate
- Have your program move forward and then draw the figure based on a color seen. Let the color pick the number of sides.
This topic: CenterForComputing
> WebHome >
SyllabiSpring2025 >
CSC102SylS2025 > CSC102S2025Lab3
Topic revision: r1 - 2025-01-27 - CathyBareiss