Initial commit: Python learning project with examples and exercises

This commit is contained in:
2025-07-20 17:08:50 +08:00
commit bc7bb56271
111 changed files with 11535 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
#e2.3DrawPython.py
from turtle import*
def drawSnake(radius, angle, length):
seth(-40)
for i in range(length):
circle(radius, angle)
circle(-radius, angle)
circle(radius, angle/2)
fd(20)
circle(16, 380)
fd(40* 2/3)
setup(1000, 350, 200, 200)
penup()
fd(-250)
pendown()
pensize(25)
pencolor("purple")
drawSnake(40, 80, 4)
seth(0)
pencolor("blue")
drawSnake(40, 80, 4)
done()