Forked from Mohammed-abdelawal/palestine_flag_in_terminal.py
Created
July 27, 2020 13:55
-
-
Save aydi-nebil/2b66a18897546009a1a7c71223ef584b to your computer and use it in GitHub Desktop.
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
from termcolor import colored | |
mark = '*' | |
width = 110 | |
height = 30 | |
red = int(height /3) | |
for i in range(1,height): | |
x = 0 | |
if i < int((height/2))+1 : | |
x = i*2 | |
print(colored(mark*x,'red','on_red'),end='') | |
else : | |
x = 2*(height - (i)) | |
print(colored(mark*x,'red','on_red'),end='') | |
if i < red : | |
print(colored(mark*(width-x),'grey','on_grey')) | |
elif i < red*2 : | |
print(colored(mark*(width-x),'white','on_white')) | |
else : | |
print(colored(mark*(width-x),'green','on_green')) | |
print(colored('Mohammed Abdelawal','magenta')) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment