Skip to content

Instantly share code, notes, and snippets.

@LintangWisesa
Created November 12, 2023 09:18
Show Gist options
  • Save LintangWisesa/059be65b6fbd49eac947fda65b4c7a8b to your computer and use it in GitHub Desktop.
Save LintangWisesa/059be65b6fbd49eac947fda65b4c7a8b to your computer and use it in GitHub Desktop.
palestine.py
colors = ["🟥", "⬛", "⬜", "🟩"]
height, width = 10, 15
flag, bars = "", ""
for i in range(0, height-1):
if i <= 4:
flag += colors[0]
if i <= 2:
bars = colors[1] * (width-i+1)
else:
bars = colors[2] * (width-i+1)
else:
flag = flag[:-1]
if i <= 5:
bars = colors[2] * (width-i+1+(2*abs(i-4)))
else:
bars = colors[3] * (width-i+1+(2*abs(i-4)))
print(flag, bars)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment