Use python to draw various patterns of the Dragon Boat Festival, such as rice dumplings, dragon boat racing, etc., as well as some touching stories about the Dragon Boat Festival

Insert image description here

1. Interesting stories about the Dragon Boat Festival

The Dragon Boat Festival is a traditional Chinese festival with a long history, and there are many interesting stories related to it. Here are some classic stories:

  1. Qu Yuan threw himself into the river: Qu Yuan was a famous poet and politician in the history of Chinese literature. His unfortunate experiences and tragic fate were highly praised. According to legend, during the Warring States Period, he committed suicide by drowning himself in a river because he was worried about the fate of the country. After hearing the news, local people rowed boats to rescue him, and each threw themselves into the reed swamps to find his body. Some people beat drums and rowed boats on the riverside to drive away the mythical beasts. In order to commemorate Qu Yuan, people designated the Dragon Boat Festival as the "Dragon Boat Festival".

  2. Zongzi origin story: It is said that during the Warring States Period, the people of Chu State threw food into the river to prevent Qu Yuan's body from being eaten by fish and shrimp, so that the fish and shrimp would not harm Qu Yuan when they were full. But they were still worried that the food would not be enough to attract fish and shrimp, so they wrapped rice balls in bamboo leaves and threw them into the river. Later, this practice gradually evolved into the rice dumplings we know today.

  3. Legend of Five-Colored Thread: According to legend, in ancient times, a kind of silk called five-colored thread could ward off evil spirits. One year during the Dragon Boat Festival, many children were possessed by demons, except for one little girl who they dared not approach. Later, people discovered that she was carrying five-colored threads, so everyone began to use five-colored threads to ward off evil spirits and tied the five-colored threads on their children's hands and feet.

These stories are classic stories during the Dragon Boat Festival, which have been passed down to this day and are deeply loved by people.


2. Interesting facts about the Dragon Boat Festival

OK, here are 5 interesting facts about the Dragon Boat Festival:

  1. Details of making rice dumplings: In addition to wrapping the rice dumplings with bamboo leaves, some places also use calamus leaves, reed leaves and other materials to wrap the rice dumplings to increase the aroma. In addition, during the process of making rice dumplings, the glutinous rice must be soaked in ponds or rivers to allow the rice to ferment in the water, which will make the rice dumplings taste better.

  2. Five activities of the Dragon Boat Festival: In addition to eating rice dumplings and racing dragon boats, there are five traditional activities during the Dragon Boat Festival, namely horse racing, pot throwing, archery, outing and moxa leaf planting. These activities have a profound historical and cultural background, and also express people's respect for nature, ancestors, etc.

  3. Taboos on eating rice dumplings: Eating rice dumplings during the Dragon Boat Festival is a traditional Chinese custom, but there are special taboos in some areas. For example, in Fujian Province, women are not allowed to eat rice dumplings during pregnancy because they believe they will affect the health of the fetus. Similarly, in some places in Jiangsu Province, it is also believed that eating rice dumplings during the Dragon Boat Festival will lead to oral ulcers and other diseases.

  4. Alternative customs in different regions: In the Guangxi Zhuang Autonomous Region, people will throw glutinous rice on the Wangcheng Tower the day before the Dragon Boat Festival to drive away plagues and disasters; in Liangshan Yi Autonomous Prefecture, Sichuan Province, people will bake a noodle-like dish before the Dragon Boat Festival. Low-lium flour products, called "kaka", are used to pray for a good harvest.

  5. Cultural exchanges of the Dragon Boat Festival: The Dragon Boat Festival is a traditional cultural festival in China. It later spread to Southeast Asia and is now widely spread in East Asia. According to legend, Japan and North Korea also have similar festivals, but with different names. Japan calls it "Dragon Boat Festival (たんご) Festival" and South Korea calls it "Dragon Boat Festival (단오제)". Different countries and regions also have different customs and customs during the Dragon Boat Festival.


3. Use python to draw a dragon boat

3.1. The code is as follows

import turtle

# 龙舟数据
boat_width = 30
boat_height = 80
boat_color = 'red'
paddle_width = 25
paddle_height = 8
paddle_color = 'white'
num_paddles = 10
paddle_spacing = 10
paddle_offset = 5

# 设置画笔属性
turtle.penup()
turtle.speed(0)

# 绘制龙舟
turtle.color('black', boat_color)
turtle.begin_fill()
turtle.goto(-boat_width/2, 0)
turtle.pendown()
turtle.forward(boat_width)
turtle.left(90)
turtle.forward(boat_height)
turtle.left(90)
turtle.forward(boat_width)
turtle.left(90)
turtle.forward(boat_height)
turtle.end_fill()

# 绘制划手
turtle.right(90)
turtle.color('black', paddle_color)
turtle.penup()
y = boat_height/2 - paddle_offset
for i in range(num_paddles):
    x = (-num_paddles/2 + i) * (paddle_width + paddle_spacing)
    turtle.goto(x, y)
    turtle.pendown()
    turtle.begin_fill()
    turtle.forward(paddle_width)
    turtle.right(90)
    turtle.forward(paddle_height)
    turtle.right(90)
    turtle.forward(paddle_width)
    turtle.right(90)
    turtle.forward(paddle_height)
    turtle.end_fill()

# 显示画布
turtle.hideturtle()
turtle.done()

3.2 Graphic display

Insert image description here

4. Use python to draw a big cock

  1. The custom of posting a big rooster during the Dragon Boat Festival mainly originated from folklore in the south. Legend has it that in ancient times, areas in the south near rivers, lakes and seas were often hit by disasters. Local residents moved away one after another, leaving only one orphaned chicken. After discussion, this orphaned chicken decided to save face for the local residents and revitalize their homeland. So she transformed into a Chicken Fairy and led the entire chicken army to fight against the enemy, eventually defeating the beast and ensuring the safety and interests of the local people. Therefore, in the southern region, people regard chickens as a symbol of auspiciousness. They also believe that chickens can ward off evil spirits, avoid evil, and pray for good fortune in their homes.
  2. Over time, this custom gradually evolved into the current practice of posting big roosters during the Dragon Boat Festival. People hanging pictures of chickens during the Dragon Boat Festival certainly have the effect of calming demons, but more often they are used to pray for good luck and peace. The above is just folklore, and different regions may have their own specific customary meanings.
import turtle

# 设置画布和画笔
canvas = turtle.Screen()
canvas.bgcolor("#FCD08F")
pen = turtle.Turtle()
pen.speed(2)

# 绘制鸡冠
pen.penup()
pen.goto(-50, 100)
pen.pendown()
pen.fillcolor("#F44336")
pen.begin_fill()
pen.circle(50, 180)
pen.right(90)
pen.forward(100)
pen.left(90)
pen.circle(-50, 180)
pen.right(90)
pen.forward(100)
pen.end_fill()

# 绘制鸡头和嘴巴
pen.penup()
pen.goto(-80, 100)
pen.pendown()
pen.fillcolor("#FFEB3B")
pen.begin_fill()
pen.right(120)
pen.forward(50)
pen.left(60)
pen.forward(70)
pen.left(60)
pen.forward(50)
pen.end_fill()

pen.penup()
pen.goto(-50, 85)
pen.pendown()
pen.right(30)
pen.forward(25)
pen.left(90)
pen.forward(25)

# 绘制鸡身体
pen.penup()
pen.goto(0, 0)
pen.pendown()
pen.fillcolor("#F44336")
pen.begin_fill()
pen.right(45)
pen.forward(150)
pen.right(90)
pen.forward(100)
pen.right(90)
pen.forward(150)
pen.end_fill()

# 绘制鸡尾巴
pen.penup()
pen.goto(75, 10)
pen.pendown()
pen.right(45)
pen.fillcolor("#FFEB3B")
pen.begin_fill()
pen.right(160)
pen.forward(40)
pen.right(110)
pen.forward(60)
pen.right(110)
pen.forward(40)
pen.end_fill()

# 绘制鸡腿
pen.penup()
pen.goto(0, -40)
pen.pendown()
pen.fillcolor("#FFEB3B")
pen.begin_fill()
pen.right(90)
pen.forward(40)
pen.right(90)
pen.forward(25)
pen.right(90)
pen.forward(40)
pen.right(90)
pen.forward(25)
pen.end_fill()

pen.penup()
pen.goto(60, -40)
pen.pendown()
pen.fillcolor("#FFEB3B")
pen.begin_fill()
pen.right(45)
pen.forward(40)
pen.right(90)
pen.forward(25)
pen.right(90)
pen.forward(40)
pen.right(90)
pen.forward(25)
pen.end_fill()

# 隐藏画笔
pen.hideturtle()

# 显示绘画窗口
turtle.done()

5. Use python to play poetry games during the Dragon Boat Festival

import random

# 定义诗词库
poems = {
    
    
    "清明": "清明时节雨纷纷,路上行人欲断魂。",
    "端午": "五月初五是端阳,银鞍照白马,春水碧于天。",
    "中秋": "云中谁寄锦书来,雁字回时,月满西楼。",
}

# 定义游戏函数
def game():
    keys = list(poems.keys())  # 获取诗词主题列表
    topic = random.choice(keys)  # 随机选择主题
    print("主题:", topic)
    print("请根据主题写一句诗:")
    verse = input()  # 输入诗句
    if verse in poems[topic]:  # 判断是否匹配
        print("恭喜你,诗词正确!")
    else:
        print("很遗憾,错了哟~")
        print("正确答案:", poems[topic])

# 调用游戏函数
game()

Summarize

In a fishing village, there is a special tradition. Every year during the Dragon Boat Festival, people in the village will light a bonfire on an island by the river and let the flames gradually burn until nightfall. This tradition has hundreds of years of history, and many people come to participate in the Dragon Boat Festival every year.

There is a child named Xiao Ming. He has heard about this Dragon Boat Festival tradition since he was a child and has always wanted to see it. However, his family is very poor and his life is not rich, so he has no chance to participate in such activities. Xiao Ming was very disappointed. At this time of year, he felt very regretful that he could not participate when he saw others attending activities.

Just this year, Xiao Ming's neighbor's son, named Xiao Gang, suddenly fell ill and needed surgery. However, the family's financial situation was not very optimistic and his family didn't know what to do.

After Xiao Ming learned about the situation, he decided to find a way to help Xiao Gang. He thought of the 600 yuan he had on him, which he had saved for more than a month through frugality, but he was reluctant to see Xiao Gang's family. In trouble, he decided to donate all the money he saved to Xiaogang. With his persistence, he finally convinced Xiaogang's family, who accepted Xiaoming's donation and said thank you gratefully.

On the day of the Dragon Boat Festival, there was no one at Xiao Ming's house because his family went out. Xiao Ming ran to the river to watch the event. Although he didn't participate and didn't bring anything with him, he was still very excited. He looked at the slow flow of the river and imagined the beauty and magic of the torch. He felt very happy. He came to the fire, and then he suddenly discovered that the fire was not a burning short stick, but a real wood pile that was lit by some people gathered together.

He stood by the fire and looked up at the flames, which for him was full of hope and peace. He suddenly saw his selflessness and courage in helping Xiaogang, and he felt happy and proud of himself.

At this time, he heard someone calling his name. It was a girl named Xiao Hong. Xiao Ming seemed very shy in front of her, but he still walked towards her. Xiao Hong said: "What are you doing? Can we come together?" Xiao Ming nodded, he felt very interesting, so the two children walked to the fire, held their hands together, and looked at the bonfire and the starry sky.

Xiao Ming fell in love with the Dragon Boat Festival from that day on, because he felt the warmth and touch on that day. He also understood that the happiness he longed for was not necessarily money and material things, nor was it just the opportunity to participate in activities. It was also hidden deep in people's hearts, waiting to be discovered and opened up.

This Dragon Boat Festival is no longer a lonely and regretful day for Xiao Ming.

Guess you like

Origin blog.csdn.net/qlkaicx/article/details/131338132