Draw what the following script would draw when run.
function main() var n := 0 turtle→set heading(180) for 0 ≤ i < 3 do turtle→forward(50) n := n + 90 turtle→left turn(n) end for end function
Draw what the following script would draw when run.
function do something( a: Number) do turtle→left turn(a) turtle→forward(100) turtle→right turn(a) end function function main() do something(90) turtle→forward(100) end function
Create a script with a function called
draw triangle
with one parametersize
. The function should draw a triangle with the side length specified by the parametersize
.