Python Turtle - Code a Star Tutorial

preview_player
Показать описание
Learn how to quickly and easily draw a star using the Turtle module in Python.

If you would like to rotate the star so it looks "normal", simply change the line of code that says left(144) to right(144).

~ CODE ~

from turtle import *

for i in range(5):
forward(200)
right(144)

hideturtle()
Рекомендации по теме
Комментарии
Автор

I think to solve that problem, all lines are different to write😊

xith-ebjeevanraj.l
Автор

Followed your code exactly, using Pycharm as editor. Unfortunately it only fills the leaves and not the hexagon in the middle. Using your exact code:

from turtle import *

goto(-150, 0)
bgcolor("black")
color("yellow")
speed(0)

begin_fill()
points = 1
while points < 5:
forward(250)
left(145)
points = points + 1
end_fill()

hideturtle()

any ideas?
using python 3.6.5

denicetuinhof