It was cool but when I used it it gave me another shape but that was cool to!
For anyone having an AttributeError, I have a solution. If it’s in line 3, capitalize the t at the start of the second turtle like this: t = turtle.Turtle() and make sure to put the parenthesis’s at the end If it’s in line 4, there’s two possibilities. First, u forgot the parenthesis after screen Second, u didn’t capitalize the S in screen. Line 4 should be: s = turtle.Screen().bgcolor(‘black’) Hope that helped! If u have any other problems send the error message and I will try to help
thaks worked 👍👍👍👍
If you go to the speed code and change it to 100-500 it goes faster! Well faster in printing,Hope this helps for someone that wants SPEED😎
import turtle import colorsys # Set up the screen screen = turtle.Screen() screen.bgcolor("black") screen.title("Colorful Spiral Animation") # Create a turtle object spiral = turtle.Turtle() spiral.speed(0) # Set to the fastest speed spiral.width(2) # Set the width of the lines # Number of colors num_colors = 36 colors = [colorsys.hsv_to_rgb(i/num_colors, 1, 1) for i in range(num_colors)] # Draw a colorful spiral for i in range(360): color = colors[i % num_colors] # Cycle through colors spiral.color(color[0], color[1], color[2]) # RGB values spiral.forward(i * 2) # Spiral expands with each step spiral.right(59) # Angle of the turn # Hide the turtle and display the result spiral.hideturtle() # Close the window on click screen.exitonclick()
Thank you so much for this!
import math from turtle import * def hearta(k) : return 15*math.sin(k)**3 def heartb(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(hearta(i)*20,heartb(i)*20) for j in range(5): color("#f73487") goto(0,0) done()
thanks man ,,,i was trying to figure out what was wrong
Amazing i just tried ❤
You can also change circles size in the last line, t.circle(250) is the maximum size in my computer
import colorsys import turtle t = turtle.Turtle() # Add parentheses after turtle.Turtle s = turtle.Screen().bgcolor('black') t.speed(0) n = 70.0 # Use a float value for smoother color transitions h = 0 for i in range(360): c = colorsys.hsv_to_rgb(h, 1, 0.8) h += 1/n t.color(c) t.left(1) t.fd(1) for j in range(2): t.left(2) t.circle(100)
The best one thank you so much❤
i have created one by refering to the code, thats really nice
FUIYOH, Nice
These are easy and cool tutorials for beginners.
Mero tyo vs code me one shot me done hogaya 😂thanks bro🎉
import colorsys t = turtle.Turtle() s = turtle.Screen().bgcolor('black') t.speed(0) n = 70 Like h = 0 for i in range (360): c = colorsys.hsv_to_rgb(h, 1, 0.8 h+= 1/n Dislike t.color(c) t.left(1) t.fd(1) for j in range (2): 256 t.left(2) t.circle(100)
this works tysm broo
the correct code is here import turtle import colorsys t = turtle.Turtle() s = turtle.Screen() s.bgcolor('black') t.speed(0) n = 70 h = 0 for i in range(360): c = colorsys.hsv_to_rgb(h, 1.0, 1.0) h += 1/n t.color(c) t.left(1) t.forward(1) for j in range(2): t.left(2) t.forward(i*2) turtle.done()
@sivaraman8442