Back to Browse

How to make a beautiful Heart using python code? #Python_heart_code

93.2K views
Jan 30, 2023
2:12

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

Download

1 formats

Video Formats

360pmp45.1 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

How to make a beautiful Heart using python code? #Python_heart_code | NatokHD