Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ghosts6/turtle.py
https://github.com/ghosts6/turtle.py
Last synced: about 16 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/ghosts6/turtle.py
- Owner: Ghosts6
- Created: 2023-09-29T03:22:19.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-22T16:38:17.000Z (8 months ago)
- Last Synced: 2024-03-22T17:33:36.367Z (8 months ago)
- Language: Python
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
![baner](https://github.com/Ghosts6/Local-website/blob/main/img/Baner.png)
# 🖱️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)