这个代码是心形图案,不知道在哪里出现错误求大佬给以解答,谢谢了各位
1.import time
sentence = "我爱你!"
for char in sentence.split():
allChar = []
for y in (12,-12,-1):
lst = []
lst_con=''
for x in range(-30,30):
formula = ((x*0.05)*2+(y0.1)**2-1)*3-(x0.05)*2(y*0.1)**3
if formula <= 0:
else:
lst_con += char[(x) % len(char)]
lst_con += ''
lst.append(lst_con)
allChar += lst
print(' \n'.join(allChar))
time.sleep(1)
代码呢