Created
September 18, 2022 14:50
-
-
Save CodeMaster7000/0fd75dae4a0760ffb2de8cdba1ce3a26 to your computer and use it in GitHub Desktop.
RIP Queen Elizabeth II. Long Live King Charles III!
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
def crown(length, height): | |
for i in range(0, height): | |
for j in range(0, length): | |
if i == 0: | |
print(" ", end = "") | |
elif i == height - 1: | |
print("-", end = "") | |
elif ((j < i or j > height - i) and | |
(j < height + i or | |
j >= length - i)) : | |
print ("#", end = "") | |
else : | |
print (" ", end = "") | |
print() | |
length = 51 | |
height = int((length - 1) / 2) | |
crown(length, height) | |
print("\nRIP Queen Elizabeth II. Long Live King Charles III!\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment