+ 23
[ 🏆 Challenge 🏆] :: Sierpinski Triangle 💡🎮🔺🔽⚠
Sierpinski Triangle To make a Sierpinski Triangle, 1) Make a triangle 2) Cut the triangle into 4 equal parts from the midpoints of the 3 sides. Make the central area blank. 3) Keep repeating this process as many times as you may want with the smaller triangles that form. So, the challenge is to make a Sierpinski Triangle divided input - 1 times. Due to the character limit in description, I have typed the examples in a code. https://code.sololearn.com/ce1Ej7LsNlSL/?ref=app All languages allowed.
4 odpowiedzi
+ 12
@Swapi..
It is not the exact solution of your challenge, but...
I adapted a program for pascal triangle the following way:
If number is even: print *
if number is odd: print " "
The fully beautiness cant be shown on sololearn. But you get an idea with testing the prog with 8
https://code.sololearn.com/cinuHRib2An2/#py
+ 7
That's a hard one, I have only made Sierpinski triangles with the turtle module which, is not supported here.