removed 2nd tree

This commit is contained in:
Simon Pirkelmann 2020-11-22 14:42:22 +01:00
parent a0ecab2b0f
commit 251469ead4

View File

@ -21,10 +21,5 @@ def generate_christmas_tree(height):
return "\n".join(["".join(['+' if abs(j - (height)/2) < i/2 else ' ' return "\n".join(["".join(['+' if abs(j - (height)/2) < i/2 else ' '
for j in range(height)]) for i in range(height)]) for j in range(height)]) for i in range(height)])
def generate_xmas(height):
return "\n".join([' ' * (height - i) + '+' * 2 * i + ' ' * (height - i) for i in range(height)])
print("christmas tree:") print("christmas tree:")
print(generate_christmas_tree(14)) print(generate_christmas_tree(14))
print(generate_xmas(10))