Skip to content

Instantly share code, notes, and snippets.

@joelibaceta
Last active June 14, 2019 22:43
Show Gist options
  • Save joelibaceta/704abf87e1d5d1d59cc6cff72c385129 to your computer and use it in GitHub Desktop.
Save joelibaceta/704abf87e1d5d1d59cc6cff72c385129 to your computer and use it in GitHub Desktop.
A monster code for draw a tree
c =0
""" ."""
b = 34
""" ###"""
while b > 0 \
and c < 33 :
""" ############"""
print( '\33[1;32;48m' + \
' '*b+'*'+'*'*c+'\33[0m')
""" #########################"""
b -=1
c +=2
""" """
""" """
for r in range(3):
print( ' ' * 33 + '||' )
print( ' '*31 + '\====/\n')
python tree.py
*
***
*****
*******
*********
***********
*************
***************
*****************
*******************
*********************
***********************
*************************
***************************
*****************************
*******************************
*********************************
||
||
||
\====/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment