# 08.ดอกไม้หลายแฉก

{% code lineNumbers="true" fullWidth="true" %}

```python
from turtle import *  # นำเข้าฟังก์ชันทั้งหมดจากโมดูล turtle
speed(100)  # ตั้งค่าความเร็วในการวาดเป็นสูงสุด (เร็วมาก)
pensize(3)  # กำหนดความหนาของเส้นปากกาเป็น 3 หน่วย
c=['red','green','blue']  # สร้างรายการสีที่มีสีแดง สีเขียว และสีน้ำเงิน
for x in range(100):  # เริ่มลูปซ้ำ 100 ครั้ง
    pencolor(c[x%3])  # ตั้งค่าสีปากกาตามลำดับในรายการ c โดยใช้การหารเอาเศษเพื่อวนลูปสี
    rt(45)  # หมุนกระดองเต่าไปทางขวา 45 องศา
    fd(200)  # เคลื่อนที่ไปข้างหน้า 200 หน่วย
    lt(45)  # หมุนกระดองเต่าไปทางซ้าย 45 องศา
    fd(100)  # เคลื่อนที่ไปข้างหน้า 100 หน่วย
    lt(90+45)  # หมุนกระดองเต่าไปทางซ้าย 135 องศา (90+45 องศา)
    fd(100)  # เคลื่อนที่ไปข้างหน้า 100 หน่วย
    lt(45)  # หมุนกระดองเต่าไปทางซ้าย 45 องศา
    fd(200)  # เคลื่อนที่ไปข้างหน้า 200 หน่วย
    lt(360/100)  # หมุนกระดองเต่าไปทางซ้ายตามมุมที่ได้จาก 360 หารด้วย 100 องศา (3.6 องศา)
mainloop()  # รักษาหน้าต่างการวาดให้เปิดอยู่ จนกว่าจะมีการคลิกเพื่อปิด
```

{% endcode %}

<figure><img src="/files/bxAncoZgz7WqRk5Hqhpu" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://krootee.gitbook.io/python-turtle/1.example01-10/08..md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
