# -*- coding:utf-8 -*- import turtle import time # 画爱心的顶部 def LittleHeart(): for i in range(200): turtle.right(1) turtle.forward(2) # 输入表白的语句,默认I Love you love = input('请输入表白语句,默认为输入为"I Love you": ') # 输入署名或者赠谁,没有不执行 me = input('请输入您心上人的姓名或者昵称:…
python爱心表达函数初级版本:def my_heart(a,b=2): print("\n".join(["".join([(a[(x-y) % len(a)] \ if ((x*0.04)**2+(0.1*y)**2-1)**3-(x*0.04)**b*(0.1*y)**3 \ <=0 else " ") for x in range(-30,30)]) \ for y in range(30,-20,-1)]))my_heart(&…