Python Turtle - Code a Rectangle Tutorial

preview_player
Показать описание
Learn how to quickly draw a rectangle using Python's Turtle module.

~ CODE ~

from turtle import *

fillcolor("red")
begin_fill()

for i in range(2):
forward(300)
right(90)
forward(150)
right(90)

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

Thank you, I am so glad i found this. It really helped me out

MirMoney.
Автор

How do you read the position of the mouse? For exemple, how do you know if the mouse touched your rectangle?

britoroque
Автор

Please can you draw 8 stars in different colours in same row

hassanmahmoud
Автор

its doing the rectangle but the screen is not stopping its jus disappear when it finishes

arunasclasses
Автор

does it work if i putc left instead of right ?

seaflame