Lesson 5: Colours and fills
이 페이지는 최신 브라우저(SharedArrayBuffer 지원)가 필요합니다. Chrome, Edge, Firefox 또는 Safari를 최신 버전으로 업데이트해 주세요.
English
Colour the pen
pencolor("red")changes the line colour.fillcolor("yellow")sets the colour inside a shape.- Draw the shape between
begin_fill()andend_fill()to colour it in.
Words for this lesson
| Word | Meaning |
|---|---|
| pen colour | the colour of the lines |
| fill | colour the inside of a closed shape |
| list | many values in one variable: ["red", "blue"] |
English
A filled square
import turtle
turtle.pencolor("blue")
turtle.fillcolor("yellow")
turtle.begin_fill()
for i in range(4):
turtle.forward(100)
turtle.left(90)
turtle.end_fill()
난이도 2/5 · 140코인 + 오늘 첫 완료 시 작은 보너스 추가
Draw a triangle with sides of 150 steps, filled with the colour orange.
출력을 보려면 '실행'을 클릭하세요.
난이도 2/5 · 140코인 + 오늘 첫 완료 시 작은 보너스 추가
Draw a hexagon with sides of 80 steps. Give each side a different colour from this list: colors = ["red", "orange", "yellow", "green", "blue", "purple"].
출력을 보려면 '실행'을 클릭하세요.