How to make a beautiful Heart using python code?

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ต.ค. 2024
  • Code:
    import math
    from turtle import *
    def heart(k):
    return 15*math.sin(k)**3
    def heart1(k):
    return 12*math.cos(k)-5*\
    math.cos(2*k)-2*\
    math.cos(3*k)-\
    math.cos(4*k)
    speed(1000)
    bgcolor('black')
    for i in range(6000):
    goto(heart(i)*20,heart1(i)*20)
    for j in range(5):
    color('pink')
    done()
    #pythonturtle #codingtechnique #100pythonpracticecode

ความคิดเห็น • 15

  • @security-u1b
    @security-u1b 7 หลายเดือนก่อน +2

    Can you help me solve the problem of Termelan? I have a problem with it

  • @PartyNorth2
    @PartyNorth2 6 วันที่ผ่านมา

    Nice code. Thanks for sharing, it's a bit slow so i changed the speed for a bit for faster drawing

  • @sidranati962
    @sidranati962 7 หลายเดือนก่อน +8

    I’m a beginner can please tell what are the first steps

    • @TechniqueCoding
      @TechniqueCoding  7 หลายเดือนก่อน +2

      First learn basics

    • @devdasbalici5481
      @devdasbalici5481 5 หลายเดือนก่อน +3

      What video '12 hours in phyton lesson for free'

  • @آنسهقهوة-ي1غ
    @آنسهقهوة-ي1غ 4 หลายเดือนก่อน +2

    فيه ايروو في رقم ١٦ ليه؟

  • @03ATHEER
    @03ATHEER 2 หลายเดือนก่อน

    says wildcard import from a library not allowed 😖

  • @glorielappay894
    @glorielappay894 2 หลายเดือนก่อน +4

    it not work

  • @Cell.77
    @Cell.77 หลายเดือนก่อน

    Its not working for me it does shows a small heart

    • @Cell.77
      @Cell.77 หลายเดือนก่อน

      But nothing more

  • @NoorAli-vu1ru
    @NoorAli-vu1ru 4 หลายเดือนก่อน

    How can I run it it’s not working

    • @FlyingRaijin-re2sg
      @FlyingRaijin-re2sg 3 หลายเดือนก่อน +2

      try to replace the (n) in line 8 into (i)

    • @NLl-pk3hy
      @NLl-pk3hy 12 วันที่ผ่านมา

      He tell me there is error in line 8

  • @El_Ruso.1
    @El_Ruso.1 8 หลายเดือนก่อน

    grx crack me funciono