Created
November 12, 2023 09:18
-
-
Save LintangWisesa/059be65b6fbd49eac947fda65b4c7a8b to your computer and use it in GitHub Desktop.
palestine.py
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
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