程序员的浪漫

import time
sentence = "hello"
for char in sentence.split():
allChar = []
for y in range(12, -12, -1):
lst = []
lst_con = ''
for x in range(-30, 30):
formula = ((x*0.05)**2+(y*0.1)**2-1)**3-(x*0.05)**2*(y*0.1)**3
if formula <= 0:
lst_con += char[(x) % len(char)]
else:
lst_con += ' '
lst.append(lst_con)
allChar += lst
print('\033[0;32m'+'\n'.join(allChar)+'\033[0m') # 设置字体颜色和背景
time.sleep(1)

 

posted @ 2019-10-12 15:19  黑色盒子  阅读(389)  评论(0编辑  收藏  举报