第一期 Python 程式設計入門共學營作業任務十


from turtle import *
angle = 360/9
length = 100
import turtle
turtle.color( 'red')
turtle.begin_fill()
for i in range(8):
  forward(length)
  left(6)
  left(angle)
import turtle
turtle.color( 'blue')
x = -60
y = 65
turtle.up()
turtle.goto(x, y)
turtle.forward(50)
turtle.down()
for i in range(20):
  forward(150)
  left(120)
  left(6)
turtle.color( 'brown')
x = -31.5
y = 100
turtle.up()
turtle.goto(x, y)
turtle.forward(50)
turtle.down()
for i in range(26):
  forward(80)
  left(170)
  left(3)

https://static.coderbridge.com/img/cjkevin0912/8dba4491a76e48448942d816563006e0
程式實作題

#第一期Python程式設計入門共學營






留言討論