Rotation of a triangle

Challenge Level: Beginner

Learning outcomes

Students will be able to:

Requirement:

Write a program that draws a triangle, starting from point x:0, y:0, with its each 3 sides equal to 100 steps. Your program must then draw triangles that are each rotated 15 degrees from the previous one, changing its colour every time it draws a new triangle.

Testing examples:

There are no testing examples for this challenge.

Languages

Scratch

What it should look like

Click on the green flag to see the expected output of your program.

Recommended blocks
whenclicked
clearpendownpenupchangepencolorby10
gotox:0y:0move100stepsturn120degreesturn15degrees
repeat3forever
Hints
  • You may change the pen’s colour by a specified amount by using the changepencolorby10 block under the “pen” script.
  • You can speed up the drawing by selecting the turbo speed under the edit menu.

Show Scratch solution

Extra Challenge

Extra challenge #1: Edit your program so it the triangle rotates over and over (use a FOREVER block under the “control” script) for any given degrees entered by the user as the input.