Skip to content

Commit 439c7c1

Browse files
committed
commit...
1 parent fe0d40a commit 439c7c1

File tree

3 files changed

+41
-28
lines changed

3 files changed

+41
-28
lines changed

Star.py renamed to One.py

+25-25
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
import turtle
2-
a = turtle.Turtle()
3-
a.getscreen().bgcolor("black")
4-
5-
a.penup()
6-
a.goto(-200, 100)
7-
a.pendown()
8-
a.color("yellow")
9-
10-
a.speed(25)
11-
12-
13-
def star(turtle, size):
14-
if size <= 10:
15-
return
16-
else:
17-
turtle.begin_fill()
18-
for i in range(5):
19-
turtle.forward(size)
20-
star(turtle, size/3)
21-
turtle.left(216)
22-
turtle.end_fill()
23-
24-
25-
star(a, 360)
1+
import turtle
2+
a = turtle.Turtle()
3+
a.getscreen().bgcolor("black")
4+
5+
a.penup()
6+
a.goto(-200, 100)
7+
a.pendown()
8+
a.color("yellow")
9+
10+
a.speed(25)
11+
12+
13+
def star(turtle, size):
14+
if size <= 10:
15+
return
16+
else:
17+
turtle.begin_fill()
18+
for i in range(5):
19+
turtle.forward(size)
20+
star(turtle, size/3)
21+
turtle.left(216)
22+
turtle.end_fill()
23+
24+
25+
star(a, 360)
2626
turtle.done()

README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
# Python-Star
2-
a simple python code that draw a cool Star on the screen
32

4-
5-
A simple file and simple that was interesting to me.
3+
This repository includes some interesting python files

Two.py

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import turtle
2+
t = turtle.Turtle()
3+
s = turtle.Screen()
4+
s.bgcolor('black')
5+
t.speed(10)
6+
col = ['yellow', 'blue', 'white', 'green']
7+
c = 0
8+
for i in range(100):
9+
t.forward(i*10)
10+
t.right(144)
11+
t.color(col[c])
12+
if c == 3:
13+
c = 0
14+
else:
15+
c += 1

0 commit comments

Comments
 (0)