Simple turtle graphics: Difference between revisions

added graphic
m (syntax highlighting fixup automation)
(added graphic)
Line 5:
For a slightly more advanced audience, a more practical introduction to turtle graphics might be to draw a bar chart.
 
[[File:Turtle house and bar chart.png|thumb]]
See image here: https://i.imgur.com/B7YbTbZ.png
 
;Task:
::* Create a function (or subroutine) that uses turtle graphics to draw a house of a specified size as described abovedepicted. Optionally make it lovely by adding details such as, for example, doors and windows.
 
::* Create a function (or subroutine) that takes a list (array, vector) of non-negative numbers and draws a bar chart from them, scaled to fit exactly in a square of a specified size. The enclosing square need not be drawn.
1,462

edits