1、Python语言写心

print('\n'.join([
    ''.join([('Love' [(x - y) % len('Love')] if
              ((x * 0.05)**2 + (y * 0.1)**2 - 1)**3 -
              (x * 0.05)**2 * (y * 0.1)**3 <= 0 else ' ')
             for x in range(-30, 30)]) for y in range(30, -30, -1)
])
)

效果图如下:

中国七夕节( Chinese Valentine's Day)IT的浪漫情结

2、复制下面内容,ctrl+f搜索9,输出 I love you

99669999996669999996699666699666999966699666699 
99699999999699999999699666699669966996699666699 
99669999999999999996699666699699666699699666699 
99666699999999999966666999966699666699699666699 
99666666999999996666666699666699666699699666699 
99666666669999666666666699666669966996699666699 
99666666666996666666666699666666999966669999996

 效果图如下: 

中国七夕节( Chinese Valentine's Day)IT的浪漫情结

3、适合移动端的代码:

中国七夕节( Chinese Valentine's Day)IT的浪漫情结

 

 源代码:https://c.runoob.com/codedemo/5656

中国七夕节( Chinese Valentine's Day)IT的浪漫情结

 

 

源码:https://c.runoob.com/codedemo/5657
网页地址:https://www.runoob.com/try/demo_source/dylm.html
中国七夕节( Chinese Valentine's Day)IT的浪漫情结

 

 源码:https://c.runoob.com/codedemo/5655

中国七夕节( Chinese Valentine's Day)IT的浪漫情结

 

 
源码地址:https://c.runoob.com/codedemo/5588

 

 

相关文章:

  • 2021-09-13
  • 2021-09-30
  • 2021-11-19
  • 2021-08-19
  • 2021-10-24
  • 2021-06-26
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-10
  • 2022-01-13
  • 2022-02-18
  • 2021-07-28
  • 2021-10-21
相关资源
相似解决方案