Pentagram: Difference between revisions

Adding Python solution
(→‎{{header|PostScript}}: +an off topic example)
(Adding Python solution)
Line 156:
%%EOF</lang>
 
=={{header|RacketPython}}==
{{works with|Python|3.4.1}}
 
<lang python>import turtle
 
t = turtle.Turtle()
t.color("red", "blue")
t.begin_fill()
for i in range(0, 5):
t.forward(200)
t.right(144)
t.end_fill()</lang>
 
=={{header|Racket}}==
 
<lang racket>#lang racket
(require 2htdp/image)
 
(overlay
(star-polygon 100 5 2 "outline" (make-pen "blue" 4 "solid" "round" "round"))
(star-polygon 100 5 2 "solid" "cyan"))</lang>
=={{header|Tcl}}==
This implementation draws a simple pentagram on a [http://wiki.tcl.tk/1415 Canvas] widget.
Line 183 ⟶ 204:
;# or animate it!
</lang>
 
=={{header|Racket}}==
 
<lang racket>#lang racket
(require 2htdp/image)
 
(overlay
(star-polygon 100 5 2 "outline" (make-pen "blue" 4 "solid" "round" "round"))
(star-polygon 100 5 2 "solid" "cyan"))</lang>