how to create python logo

import turtle


def draw_python_logo():

    window = turtle.Screen()

    window.bgcolor("white")


    logo = turtle.Turtle()

    logo.speed(2)  # Adjust the speed as needed


    # Draw the outer circle

    logo.color("blue")

    logo.width(3)

    logo.circle(100)


    # Draw the inner circle

    logo.color("yellow")

    logo.width(3)

    logo.circle(70)


    # Draw the eyes

    logo.penup()

    logo.goto(-30, 120)

    logo.pendown()

    logo.color("blue")

    logo.begin_fill()

    logo.circle(10)

    logo.end_fill()


    logo.penup()

    logo.goto(30, 120)

    logo.pendown()

    logo.color("blue")

    logo.begin_fill()

    logo.circle(10)

    logo.end_fill()


    # Draw the mouth

    logo.penup()

    logo.goto(-40, 85)

    logo.pendown()

    logo.width(5)

    logo.right(90)

    logo.circle(40, 180)


    turtle.done()


draw_python_logo()

 

Post a Comment

0 Comments