Created
July 27, 2020 11:59
-
-
Save Mohammed-abdelawal/6d936c518d11d0519f3b18e9062b5b32 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