Share your repls and programming experiences

← Back to all posts
How To Create A Black Hole Spiral in Python W/ Turtle
nothplus (63)

Hello Programmers,

This is a innovative and creative way of showing of your programming skills in Python with Turtle by creating this Spiral which later centres into a Black Hole.

Step 1 - Import and Name your turtle
Step 2 - Create a for - in range and mark anything more than 100
Step 3 - Go forward by 180 or more
Step 4 - Go left by 70 or more
Step 5 - Go forward by 60 or more
Step 6 - Go right by 40 or more
Step 7 - Pen up
Step 8 - Set position 0,0
Step 9 - Pen down
Step 10 - Go right by 2 or more

Challenge: Add Colour to make it a Rainbow Spiral

There you have it Ten Easy Steps to make a pretty fascinating Black Hole Spiral and impress other programmers.

Commentshotnewtop
SurfaceBreak (7)

Kl work it looks a bit like a computer fan

IEATPYTHON (312)

Why don't you put this in a while True loop and let it run forever
https://repl.it/@IEATPYTHON/Black-Hole-Spiral-3D-modification
I made it so some of the turns were a random number. After running this for a bit it look 3 Dimensional!

nothplus (63)

@IEATPYTHON True! Thanks for the idea!

John_WardWard (152)

@IEATPYTHON Talking about loops, I made a tutorial on that, although it has only an upvote by myself:(.

2IsAPrimeNumber (11)

@IEATPYTHON Hi. I really like your modification. Here's a little trick I've heard: Hiding the turtle helps draw faster. I found this information here.

olivierkouassi (3)

that's great , i like it

John_WardWard (152)

Maybe up the speed to 100 to make it quicker?

IEATPYTHON (312)

@John_WardWard You can only choose a speed between 0-10

ScubaHero (2)

How do you open up result in a repl?

Mohanad_Alaas (3)

@ScubaHero It just opens when you upload your tutorial, thanks for the feedback, It would be great if you could support this tutorial as well if you really liked it!

IEATPYTHON (312)

@nothplus I would set the turtle speed to 0 so that the turtle will go as fast as possible :)

John_WardWard (152)

@IEATPYTHON I actually didn't know 0 was fastest. This really was a tutorial:)

IEATPYTHON (312)

@nothplus would you be ok if I did a python turtle tutorial too which can make a really cool spiral. I really like your tutorial and I wanted to make on like this too :>

John_WardWard (152)

@IEATPYTHON If you're interested in this kind of stuff, I've got a pixel art creator tutorial you might want to see.

IEATPYTHON (312)

@John_WardWard Sure! If you are interested in turtle my turtle circle pattern generator is out

John_WardWard (152)

@IEATPYTHON Thanks, I'll check it out now.

nothplus (63)

@IEATPYTHON Ok sure be, but sure to credit me for it and I don't mind if you straight up use the same code!

IEATPYTHON (312)

@nothplus For your tutorial I would suggest you use markdown so that it will look nicer.

With markdown you can make text bold: This text is bold
see it looks nice right

print("Your code will pop out like this")

If you want to know how to do this check out this Jser's tutorial right here>>>https://repl.it/talk/learn/A-Quick-Guide-to-Replit-Talk-Markdown/7448

2IsAPrimeNumber (11)

Hello. I have a question about Python (with Turtle), because I also want to make a tutorial with Python (with Turtle). Anyways, what version of Python and Turtle is used in Python (with Turtle)?

2IsAPrimeNumber (11)

Great tutorial, by the way!

nothplus (63)

@2IsAPrimeNumber Thanks for the feedback, It would be great if you could support this tutorial as well if you really liked it!

nothplus (63)

@2IsAPrimeNumber Yeah, when you are looking at the languages hover over them in the bottom right corner then select more languages, then search for Python and you want to pick the one that says "Python with Turtle" then there you have it!

2IsAPrimeNumber (11)

@nothplus Sorry it took so long for me to respond. What I meant in my question was what version of Turtle is used in Repl.it? For instance, Turtle 2.7, 3.7, etc. That's what I meant.

nothplus (63)

@IEATPYTHON Thanks for having his back!

2IsAPrimeNumber (11)

@Blink Python With Turtle uses a "palette"; a drawing area for the turtle. A repl is just a basic program for running text commands. You need to use a different kind of repl with a palette to use Python With Turtle.

John_WardWard (152)

@Blink Python has only got the console, and cannot open a canvas on repl. Turtle has console and canvas.

MomenMalik (0)

AMAZING YOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.

ebest (574)

What if you added turtle.tracer?

Check_Mate (0)

cool, but takes SOOOOO long

Charles686 (0)

Really good. Helped me a lot and has clear instructions!

2IsAPrimeNumber (11)

Did you know that if the speed of the turtle is 0, the turtle won't have any animation; the turtle will just draw automatically without moving?

Shams_the_coder (0)

There is a problem with my Result screen page, it just shows the top left corner of the screen so I can’t see my turtle doing it’s job, and when I drag the screen all the way to the right then I only see the half of the screen which shows the half of my spiral black hole, please help me fix it, thanks

John_WardWard (152)

@Shams_the_coder Please send me a screenshot and I'll see if I can help. If not just report it in https://repl.it/bugs/ .

John_WardWard (152)

@John_WardWard Or Maybe tell one of the repl team.

zog1 (3)

That's pretty cool. I think you should speed up and hide the pen though.

Reader8765 (17)

You can get cool effects when you scroll!

Mohanad_Alaas (3)

@Reader8765 Also if you liked this tutorial a lot be sure to support it!

Reader8765 (17)

@Mohanad_Alaas Try scrolling when this is completely displayed.