View on GitHub

Tri3-IndivRepo

Alex Do's Individual Repository for Tri 3 Data Structures

Back

Code Snippet for tree.py

import time
import os

Green = "\u001b[32m"
Brown = "\033[0;33m"


def tree1():
    print("\033[0;33m                ***            ")


def tree2():
    print("                 ***            ")
    print("                 ***            ")


def tree3():
    print("\u001b[32m       * * * * * * * * * * * *  ")
    print("\033[0;33m                 ***            ")
    print("                 ***            ")


def tree4():
    print("\u001b[32m        * * * * * * * * * * *   ")
    print("       * * * * * * * * * * * *  ")
    print("\033[0;33m                 ***            ")
    print("                 ***            ")


def tree5():
    print("\u001b[32m         * * * * * * * * * *    ")
    print("        * * * * * * * * * * *   ")
    print("       * * * * * * * * * * * *  ")
    print("\033[0;33m                 ***            ")
    print("                 ***            ")


def tree6():
    print("\u001b[32m          * * * * * * * * *     ")
    print("         * * * * * * * * * *    ")
    print("        * * * * * * * * * * *   ")
    print("       * * * * * * * * * * * *  ")
    print("\033[0;33m                 ***            ")
    print("                 ***            ")


def tree7():
    print("\u001b[32m           * * * * * * * *      ")
    print("          * * * * * * * * *     ")
    print("         * * * * * * * * * *    ")
    print("        * * * * * * * * * * *   ")
    print("       * * * * * * * * * * * *  ")
    print("\033[0;33m                 ***            ")
    print("                 ***            ")


def tree8():
    print("\u001b[32m            * * * * * * *        ")
    print("           * * * * * * * *      ")
    print("          * * * * * * * * *     ")
    print("         * * * * * * * * * *    ")
    print("        * * * * * * * * * * *   ")
    print("       * * * * * * * * * * * *  ")
    print("\033[0;33m                 ***            ")
    print("                 ***            ")


def tree9():
    print("\u001b[32m             * * * * * *         ")
    print("            * * * * * * *       ")
    print("           * * * * * * * *      ")
    print("          * * * * * * * * *     ")
    print("         * * * * * * * * * *    ")
    print("        * * * * * * * * * * *   ")
    print("       * * * * * * * * * * * *  ")
    print("\033[0;33m                 ***            ")
    print("                 ***            ")


def tree10():
    print("\u001b[32m              * * * * *          ")
    print("             * * * * * *        ")
    print("            * * * * * * *       ")
    print("           * * * * * * * *      ")
    print("          * * * * * * * * *     ")
    print("         * * * * * * * * * *    ")
    print("        * * * * * * * * * * *   ")
    print("       * * * * * * * * * * * *  ")
    print("\033[0;33m                 ***            ")
    print("                 ***            ")


def tree11():
    print("\u001b[32m               * * * *          ")
    print("              * * * * *         ")
    print("             * * * * * *        ")
    print("            * * * * * * *       ")
    print("           * * * * * * * *      ")
    print("          * * * * * * * * *     ")
    print("         * * * * * * * * * *    ")
    print("        * * * * * * * * * * *   ")
    print("       * * * * * * * * * * * *  ")
    print("\033[0;33m                 ***            ")
    print("                 ***            ")


def tree12():
    print("\u001b[32m                * * *           ")
    print("               * * * *          ")
    print("              * * * * *         ")
    print("             * * * * * *        ")
    print("            * * * * * * *       ")
    print("           * * * * * * * *      ")
    print("          * * * * * * * * *     ")
    print("         * * * * * * * * * *    ")
    print("        * * * * * * * * * * *   ")
    print("       * * * * * * * * * * * *  ")
    print("\033[0;33m                 ***            ")
    print("                 ***            ")


def tree13():
    print("\u001b[32m                 * *            ")
    print("                * * *           ")
    print("               * * * *          ")
    print("              * * * * *         ")
    print("             * * * * * *        ")
    print("            * * * * * * *       ")
    print("           * * * * * * * *      ")
    print("          * * * * * * * * *     ")
    print("         * * * * * * * * * *    ")
    print("        * * * * * * * * * * *   ")
    print("       * * * * * * * * * * * *  ")
    print("\033[0;33m                 ***            ")
    print("                 ***            ")


def tree14():
    print("\u001B[93m                  *             ")
    print("\u001b[32m                 * *            ")
    print("                * * *           ")
    print("               * * * *          ")
    print("              * * * * *         ")
    print("             * * * * * *        ")
    print("            * * * * * * *       ")
    print("           * * * * * * * *      ")
    print("          * * * * * * * * *     ")
    print("         * * * * * * * * * *    ")
    print("        * * * * * * * * * * *   ")
    print("       * * * * * * * * * * * *  ")
    print("\033[0;33m                 ***            ")
    print("                 ***            \033[0;37m")


os.system("clear")
os.system("clear")
time.sleep(.1)
tree1()
time.sleep(.5)
os.system("clear")
tree2()
time.sleep(.5)
os.system("clear")
tree3()
time.sleep(.5)
os.system("clear")
tree4()
time.sleep(.5)
os.system("clear")
tree5()
time.sleep(.5)
os.system("clear")
tree6()
time.sleep(.5)
os.system("clear")
tree7()
time.sleep(.5)
os.system("clear")
tree8()
time.sleep(.5)
os.system("clear")
tree9()
time.sleep(.5)
os.system("clear")
tree10()
time.sleep(.5)
os.system("clear")
tree11()
time.sleep(.5)
os.system("clear")
tree12()
time.sleep(.5)
os.system("clear")
tree13()
time.sleep(.5)
os.system("clear")
tree14()
time.sleep(.8)
os.system("clear")