Share your repls and programming experiences

← Back to all posts
Draw Some Shapes!
slickassassin03 (99)


I know, I know. Easy right? Suddenly today I decided I wanted to mess with drawing shapes because it's fun to be completely honest. It turned into more than just a normal shape function. Going crazy with it showed me that one could really learn a lot from messing with this stuff!

Why do I care?
Well you don't have to, but personally learning projects like this are always interesting to me!

The Challenge
If you're up for it, I challenge people to create a function that does shape drawing as dynamically as possible. You would input amount of lines to cover and it would do the rest!

This is exponentially harder respective to the amount of sides of the shape you choose, but don't worry! All that you learn from it will be of great benefit to any future projects!

If you're interested, read on:


I see you're interested :)

Pleas make your script in a repository and comment with the link to it. When you're done, if you think it was too easy, maybe try a larger shape :)

Your script should

  • make a shape when called (Duh)
  • use almost entirely dynamic variables
  • handle all errors
  • be fast

That's it! Have fun obviously, but try to challenge yourself, making a function for a triangle is going to be the easiest, pick more complex shapes if you want a challenge!

I'm definitely interested in seeing what you guys do, and as a side note, this does not need to be written in Python. Use any language you'd like!

Below is my example of a triangle function:


The triangle is warping...

slickassassin03 (99)

@CodeABC123 Tried out a large number I see...

cf20600 (2)

Ah yes, I crashed my potato.

epicman702 (506)

repl process died unexpectedly: signal: killed


Nettakrim (693)

@epicman702 that happens if it takes too long to compute something

epicman702 (506)

@Nettakrim I did enter the number 9999999999...

McodeMaker (0)

i put in 99 and it did ----------------????-----------etc

OOF1234567 (0) mine is very simple but gets the job done

slickassassin03 (99)

@OOF1234567 I'm not completely sure how turtle works, but I guess it does what was intended lol. Was more hinting towards a custom module to do it yourself though.

No worries either way, still a cool program! Thanks for participating!

OOF1234567 (0)

@slickassassin03 turtle works with python to draw lines, so in other words it makes drawing easy if you dont wanna code a lot to make a shape, its pretty cool and easy to learn

aidanpatterson0 (1)

went from 'hey, that's cool, i wanna try' to 2d shape filling algorithms really quick. works, though. here to fill shapes.

slickassassin03 (99)

@aidanpatterson0 Not gonna lie, this is pretty impressive. Great script man, not something I probably could have done personally.

aidanpatterson0 (1)

@slickassassin03 i’m a shader girl, so my first instinct was, of course, to implement shader algorithms in python.

MadMath123 (343)

If you type 'int', it breaks


Very cool, I accept your challenge!

slickassassin03 (99)

@IreoluwaRaufu Can't wait to see what you come up :)

ArushWadhawan (2)

awesome amazing never better