Created
April 8, 2016 10:10
-
-
Save MaiLinhGroup/ea69e3c659e71c80dbb8f7599550d062 to your computer and use it in GitHub Desktop.
Print one christmas tree on terminal using star char
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
space = " " | |
j = 1 | |
print "Weihnachtsbaum in Python 2.x" | |
start = 1 | |
stop = 6 | |
incr = 2 | |
for i in range(start,stop,incr): | |
if i < stop - 1 : | |
print space*j ,"*" * i | |
j -= 1 | |
else: | |
print "*" * i |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment