Как я могу улучшить этот круглый дизайн? [закрыто]Python

Программы на Python
Anonymous
Как я могу улучшить этот круглый дизайн? [закрыто]

Сообщение Anonymous »

Я работаю над этой программой и хочу знать, как ее можно улучшить и хороша ли она сама по себе.
Вот код Python.
В программе используется модуль черепахи.


import turtle as t
def movecircle():
t.right(turn)
t.forward(50)
# This is what unintentionally creates the inner circle.
def moveinout():
# First it moves out,
t.left(90)
t.forward(50)
# It moves in,
t.left(180)
t.forward(330)
# Moves back out
t.backward(280)
# and continues the main circle.
t.left(90)

# Sets the number of sides to 18
s = 18
turn = 360 / s
turn = int(turn)
# Calls the turtle
t = t.Turtle()
# Moves to an appropiate location to start drawing
# Because the circle is not centered
# I have to do it myself
t.penup()
t.left(90)
t.forward(150)
t.right(90)
t.pendown()
# Loop that actually makes the circle
for i in range(0, s):
movecircle()
moveinout()


Подробнее здесь: https://stackoverflow.com/questions/798 ... lar-design

Вернуться в «Python»