https://github.com/ghosts6/turtle.py
https://github.com/ghosts6/turtle.py
python3 turtle-python
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ghosts6/turtle.py
- Owner: Ghosts6
- Created: 2023-09-29T03:22:19.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-22T16:38:17.000Z (over 1 year ago)
- Last Synced: 2025-01-16T01:49:24.389Z (6 months ago)
- Topics: python3, turtle-python
- Language: Python
- Homepage:
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README

# 🖱️Turtle exercise:
some simple code that i write to learn about turtle library and differend method and usage of it
# code sample:
```python
from turtle import*
import colorsys
bgcolor('black')
tracer(200)
def draw():
h=0
n=200
for i in range (2,2900):
c = colorsys.hsv_to_rgb(h,1,1)
h += 1/n
goto(0,0)
down()
color(c)
pensize(8)
circle(i,100)
draw()
done()
``````python
import turtle
import colorsys
t = turtle.Turtle()
t.screen.bgcolor("black")t.penup()
t.goto(-200,-100)
t.pendown()
t.speed(10)
print("enter number of triangles:",'\n')
a=400 ; h=0; n=100
def triangle():
global a,n,h
for i in range(40):
c = colorsys.hsv_to_rgb(h,1,0.6)
h = h+(1/n)
t.color(c)
t.forward(a)
t.left(120)
a = a-10
triangle()
triangle()
triangle()
triangle()
```# 📹video:
[turtle.webm](https://github.com/Ghosts6/turtle.py/assets/95994481/de321c4d-5fc1-43b3-9ba0-7f6d90eace41)