> For the complete documentation index, see [llms.txt](https://krootee.gitbook.io/python-turtle/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://krootee.gitbook.io/python-turtle/2.example11-20/17.-5.md).

# 17.รูปดาว 5 แฉก

```python
// Some code
import turtle	    #นำเข้าโมดูล turtle เพื่อใช้ในการวาดกราฟิก
t = turtle.Turtle()	#สร้างอ็อบเจ็กต์เต่า (t) ที่ใช้สำหรับการวาดรูป
t.shape('turtle')	#กำหนดรูปร่างของเคอร์เซอร์เป็นรูปเต่า
t.color('blue', 'yellow')	#กำหนดสีปากกาเป็นสีน้ำเงิน และสีเติม (fill) เป็นสีเหลือง
t.width(3)	#กำหนดความหนาของเส้นปากกาเป็น 3 หน่วย
t.begin_fill()	#เริ่มต้นการเติมสีภายในพื้นที่ที่ถูกวาดหลังจากนี้
for i in range(5):	#เริ่มต้นลูปที่ทำซ้ำ 5 ครั้ง
    t.fd(200)	#วาดเส้นตรงไปข้างหน้า 200 หน่วย
    t.rt(216)	#หมุนหัวปากกาทางขวา 216 องศา
t.end_fill()	#จบการเติมสีภายในพื้นที่ที่ถูกวาด

```

<figure><img src="https://1059722861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWAMRQLhtfzfy8yv80Se5%2Fuploads%2FP7irqT9Gs0F4FpyQB1JD%2F7.png?alt=media&amp;token=220b199f-8c26-460d-a753-6b5587242c02" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1059722861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWAMRQLhtfzfy8yv80Se5%2Fuploads%2FlddcReooIPLIBiNwWs1v%2F7-1.png?alt=media&amp;token=5bf342ae-f409-490d-bb80-003f10f3f0aa" alt=""><figcaption></figcaption></figure>
