+ 1
12th Feb 2023, 12:02 PM
Ria
Ria - avatar
2 odpowiedzi
+ 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
12th Feb 2023, 1:01 PM
DavX
DavX - avatar
+ 1
Thank u so much!!!
12th Feb 2023, 3:47 PM
Ria
Ria - avatar