Why isn’t my Turtle Python working | Sololearn: Learn to code for FREE!

-1

Why isn’t my Turtle Python working

WHY IS IT? IT’S ALL VALID CODE ACCORDING TO geeksforgeeks.com.

3/8/2021 4:28:56 PM

nvd123

5 Answers

New Answer

+5

nvd123 Sololearn doesn't support Graphics/some libraries so you need to use skulpt which is a JS framework. See here I have used. https://code.sololearn.com/W6cmk391WqiN/?ref=app

+3

Steve is right: you cannot run script wich use GUI (and so is turtle) in sololearn... the other way to make your code working (locally), would be to change 'from turtle import *' by 'import turtle' (and is better practice)

+2

When you do "from turtle import *" you import all the classes,methods and variables so no need to use turtle.Screen() , simply use Screen() . from turtle import * wn = Screen() wn.bgcolor("light green") wn.title("Turtle") skk = Turtle() skk.forward(100) and tutorials from such type of websites won't explain everything.

+1

https://code.sololearn.com/c3KKWTTPYS8m/?ref=app

+1

It's right there in the error message that it can't import Tk. I'm pretty sure I read somewhere else that Sololearn isn't configured for it.