Lesson 4: Stars
此页面需较新浏览器(支持 SharedArrayBuffer)。请升级 Chrome、Edge、Firefox 或 Safari 至最新版本。
English
Turn more than you need
- A star is a polygon where the turtle turns more at each corner.
- For a 5-point star, turn 144 degrees. The turtle goes round twice: 5 × 144 = 720.
Words for this lesson
| Word | Meaning |
|---|---|
| point | a sharp corner of a star |
| right | turn the other way (clockwise) |
English
A star
import turtle
for i in range(5):
turtle.forward(150)
turtle.right(144)
难度 2/5 · 今日首次完成可获 140 金币及少量额外奖励
Draw a 5-point star with lines of 200 steps. Turn right(144) at each point.
点击“运行”查看此处输出。
难度 3/5 · 今日首次完成可获 200 金币及少量额外奖励
Draw a 9-point star: 9 lines of 150 steps, turning right(160) each time.
点击“运行”查看此处输出。