Jump to content

Simple turtle graphics: Difference between revisions

m
remove hueshift()
(→‎{{header|Python}}: added "translated from")
m (remove hueshift())
Line 26:
Rectangle(🐢, siz, siz)
# roof
HueShift(🐢)
Reposition(🐢, x - siz / 2, y - siz / 2)
Turn(🐢, -60)
Line 35 ⟶ 34:
doorheight, doorwidth = siz / 2, siz / 4
Pencolor(🐢, 0, 0, 0)
HueShift(🐢)
Reposition(🐢, x, y + doorheight / 2)
Rectangle(🐢, doorwidth, doorheight)
# window
windowheight, windowwidth = siz /3, siz / 4
HueShift(🐢)
Reposition(🐢, x + siz / 4, y - siz / 4)
Rectangle(🐢, windowwidth, windowheight)
Line 59 ⟶ 56:
for n in data # draw each bar in chart
barheight = n * siz / maxdata
HueShift(🐢)
Reposition(🐢, x, y - barheight / 2)
Rectangle(🐢, barwidth, barheight)
4,105

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.