Skip to content

Instantly share code, notes, and snippets.

@CodeMaster7000
Created September 18, 2022 14:50
Show Gist options
  • Save CodeMaster7000/0fd75dae4a0760ffb2de8cdba1ce3a26 to your computer and use it in GitHub Desktop.
Save CodeMaster7000/0fd75dae4a0760ffb2de8cdba1ce3a26 to your computer and use it in GitHub Desktop.
RIP Queen Elizabeth II. Long Live King Charles III!
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