Basic Python Turtle Code: Rotating Crescent Moon

Publié le: 06 mai 2022
sur la chaîne: Basic Python Turtle Art
176
1

A flower-like image created by 10 imprints of a rotating crescent moon. The application of contrasting colors on the two ends of the crescent produces the flower-ish image. The simple Python Turtle code in this case has only 20 lines.

Feel free to copy and paste the simple Python Turtle code below. Ask questions about the code if you have any. Please enjoy, like, and subscribe! :)

import turtle
t = turtle.Turtle()
screen = turtle.Screen()
t.pensize(4)
def crescent_moon():
t.color("orange")
t.circle(150, 60)
t.color("blue")
t.circle(150, 60)
t.left(135)
t.circle(-212.1, 45)
t.color("orange")
t.circle(-212.1, 45)
t.left(135)
t.circle(150, 60)
for i in range(10):
crescent_moon()
t.left(36)
t.ht()
screen.exitonclick()


Sur cette page du site, vous pouvez voir la vidéo en ligne Basic Python Turtle Code: Rotating Crescent Moon durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Basic Python Turtle Art 06 mai 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 176 fois et il a aimé 1 téléspectateurs. Bon visionnage!