0

Why cant i run this code?

import turtle # Set up the screen screen = turtle.Screen() screen.bgcolor("white") # Set up the turtle turtle_artist = turtle.Turtle() turtle_artist.speed(10) turtle_artist.color("pink") # Function to draw a petal def draw_petal(): for _ in range(2): turtle_artist.circle(100, 60) turtle_artist.left(120) turtle_artist.circle(100, 60) turtle_artist.left(120) # Draw the flower for _ in range(6): draw_petal() turtle_artist.right(60) # Finish the program turtle.done()

26th Jul 2024, 11:38 PM
Hanife
Hanife - avatar
4 odpowiedzi
+ 2
There no support for the module in Sololearn Playground. But it works here. https://pythonsandbox.com/turtle
27th Jul 2024, 9:26 PM
Chris Coder
Chris Coder - avatar
+ 2
Found something here you can run turtle in the HTML EDITOR. https://www.sololearn.com/post/1703045/?ref=app
28th Jul 2024, 3:33 AM
Chris Coder
Chris Coder - avatar
0
you misspelled python, but no problem. what's the error message? module import error?
27th Jul 2024, 9:48 AM
Mihaly Nyilas
Mihaly Nyilas - avatar