+ 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.

10th Nov 2017, 11:16 AM
Swapnil Srivastava
Swapnil Srivastava - avatar
4 odpowiedzi
12th Nov 2017, 9:30 AM
Игорь Платошин
Игорь Платошин - avatar
+ 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
10th Nov 2017, 12:02 PM
Oma Falk
Oma Falk - avatar
+ 7
That's a hard one, I have only made Sierpinski triangles with the turtle module which, is not supported here.
12th Nov 2017, 1:16 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
28th Oct 2019, 11:39 AM
minirkk
minirkk - avatar