[ šŸ† Challenge šŸ†] :: Sierpinski Triangle šŸ’”šŸŽ®šŸ”ŗšŸ”½āš  | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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 Respostas
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