Skip to content

Instantly share code, notes, and snippets.

@yunho0130
Created December 25, 2016 04:18
Show Gist options
  • Save yunho0130/c7d7b910e1f6590497a74c3da58b0926 to your computer and use it in GitHub Desktop.
Save yunho0130/c7d7b910e1f6590497a74c3da58b0926 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
"""
Created on Sat Dec 24 12:39:11 2016
@author: Yunho
"""
# CM Lecture for Middle School Students
print "ver 1.3"
initial_num = 3
increasing_tree = 2
shape = "*"
space = " "
initial_num += 0
def draw_triangle(initial_num, increasing_tree):
initial_num -= 2
print space * 2 + shape * initial_num
initial_num += increasing_tree
print space * 1 + shape * initial_num
initial_num += increasing_tree
print shape * initial_num
def tree_maker(level=5):
"""Draw upper tree
You can choice level of tree"""
for i in range(1, level):
print i
pass
def pot_maker():
"""Draw pot
this is default function of tree"""
pass
def main():
"""This is main function
You can draw christmas tree using this module"""
# help(tree_maker)
# help(pot_maker)
draw_triangle(initial_num, increasing_tree)
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment