Python Turtle Graphics Source Codes Free

 Python Turtle Graphics Source Codes Free

Source Code

import turtle

# Set up the screen
screen = turtle.Screen()
screen.bgcolor("white")

# Create the turtle for the black hole
blackhole = turtle.Turtle()
blackhole.speed(0)
blackhole.hideturtle()

# Draw the black hole
for i in range(300):
    blackhole.pencolor("black")
    blackhole.pensize(1)
    blackhole.forward(i)
    blackhole.right(91)

# Show the turtle screen
turtle.done()

YouTube Video



Comments