Created
November 5, 2016 14:07
-
-
Save eternaltung/95fc6436aa1b03efd387daf795420bf1 to your computer and use it in GitHub Desktop.
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
from __future__ import print_function | |
sign = "*" | |
empty = " " | |
max = 45 | |
height = 3 | |
space = 5 | |
print() | |
# candle | |
for i in range(0,3): | |
for j in range(0, max): | |
if (j == max / 2): | |
print(sign,end='') | |
else: | |
print(empty,end='') | |
print() | |
def DrawHorizontal(left, right): | |
for i in range(0, max): | |
if (i > left and i < right): | |
print("-",end='') | |
else: | |
print(empty,end='') | |
def DrawVertical(left, right): | |
for i in range(0, height): | |
for j in range(0, max): | |
if (j == left + 1 or j == right - 1): | |
print("|",end='') | |
else: | |
print(empty,end='') | |
print() | |
# top | |
left = space * 3 - 1 | |
right = max - space * 3 | |
DrawHorizontal(left, right) | |
print() | |
DrawVertical(left, right) | |
# second | |
left = space * 2 - 1 | |
right = max - space * 2 | |
DrawHorizontal(left, right) | |
print() | |
DrawVertical(left, right) | |
# third | |
left = space - 1 | |
right = max - space | |
DrawHorizontal(left, right) | |
print() | |
DrawVertical(left, right) | |
#bottom | |
for i in range(0,max): | |
print("-",end='') | |
print() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment