generated from mwc/lab_turtle
I changed the number of degree and distance and we
try on the define function. fun and happy. at the begining of the coding, i felt nervous, and now i know the basic process of doing this assignment.
This commit is contained in:
parent
d5f6c521f1
commit
01ed095b84
17
drawing.py
17
drawing.py
|
@ -7,16 +7,13 @@ from turtle import (
|
||||||
pendown,
|
pendown,
|
||||||
color,
|
color,
|
||||||
)
|
)
|
||||||
|
def star(distance, degrees):
|
||||||
|
for side in range(5):
|
||||||
|
forward(distance)
|
||||||
|
right(degrees)
|
||||||
|
|
||||||
forward(100)
|
for size in range(10, 100, 20):
|
||||||
right(360 * 2 / 5)
|
star(size, 360*2/5)
|
||||||
forward(100)
|
|
||||||
right(360 * 2 / 5)
|
|
||||||
forward(100)
|
|
||||||
right(360 * 2 / 5)
|
|
||||||
forward(100)
|
|
||||||
right(360 * 2 / 5)
|
|
||||||
forward(100)
|
|
||||||
right(360 * 2 / 5)
|
|
||||||
|
|
||||||
input()
|
input()
|
||||||
|
|
Loading…
Reference in New Issue