Python Turtle - Code the Icelandic Flag Tutorial

Veröffentlicht am: 20 April 2020
auf dem Kanal: Geek Tutorials
2,191
20

Learn how to quickly draw the Icelandic flag using Python's Turtle module.

⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. I've been using Kite for 6 months and I love it! https://www.kite.com/get-kite/?utm_me...

~ CODE ~

from turtle import *

speed(0)
setup(800, 500)
bgcolor("royalblue")

penup()
goto(-400, -50)
pendown()

White Cross
color("white")
begin_fill()
forward(800)
left(90)
forward(100)
left(90)
forward(800)
end_fill()

Move to next position for the white cross
penup()
goto(-100, -250)
pendown()

begin_fill()
forward(100)
right(90)
forward(500)
right(90)
forward(100)
end_fill()

Move to the starting red cross position
penup()
goto(-400, -25)
pendown()

Red cross
color("red")
begin_fill()
forward(800)
left(90)
forward(50)
left(90)
forward(800)
end_fill()

penup()
goto(-125, -250)
pendown()

begin_fill()
forward(50)
right(90)
forward(500)
right(90)
forward(50)
end_fill()

hideturtle()


Auf dieser Seite können Sie das Online-Video Python Turtle - Code the Icelandic Flag Tutorial mit der Dauer online in guter Qualität ansehen, das der Benutzer Geek Tutorials 20 April 2020 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 2,191 Mal angesehen und es wurde von 20 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!