import time
import os
def display_heart():
heart = [
" ***** ***** ",
" ******* ******* ",
" ******* ******* ",
" ******* ******* ",
" *************** ",
" ************* ",
" *********** ",
" ******* ",
" *** ",
" * "
]
message = "You're loved!"
for line in heart:
print(line.center(40, ' ')) # Center the heart in the terminal
print(message.center(40, ' '))
def main():
while True:
os.system('cls' if os.name == 'nt' else 'clear') # Clear screen
display_heart()
time.sleep(1) # Heart stays up on the terminal for 1 second
os.system('cls' if os.name == 'nt' else 'clear') # Clear screen
time.sleep(0.5)
if __name__ == "__main__":
main()