Skip to content

Python code snippet – How to make a screen in turtle?

def turtle_triangle():
    window = turtle.Screen()
    window.bgcolor("red")
    
    brad = turtle.Turtle()
    
    brad.shape("turtle")
    brad.color("yellow")
    brad.speed(1)

    for _ in range(3):
        brad.right(60)
        brad.forward(200)
        brad.right(60)

    window.exitonclick() 
See also  Convert decimal to binary in Python

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.