+ 1
Can sm1 help me it idk wha the error is.
2 Respostas
+ 3
Hey Ria,
A few errors here, firstly I don’t think Turtle is supported on Sololearn codeplayground.
1) import not input for the turtle module: import turtle
2) spreed on line 9 - speed
3) Apply background colour to the screen not turtle.
Here’s your code fixed, however you will want to try this externally:
import turtle
screen = turtle.Screen()
screen.bgcolor("black")
tt = turtle.Turtle()
tt.pensize(2)
def curve():
for i in range(200):
tt.right(1)
tt.forward(1)
tt.speed(0)
tt.color("black","pink")
tt.begin_fill()
tt.left(140)
tt.forward(111.65)
curve()
tt.left(120)
curve()
tt.forward(111.65)
tt.end_fill()
tt.hideturtle()
You can test your code online here:
https://www.pythonsandbox.com/turtle
+ 1
Thank u so much!!!