osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Might be doing this wrong? (Turtle graphics)


Jason,

On 21/03/19 12:34 PM, jasonanyilian at gmail.com wrote:
> So, I typed in code:
> from turtle import *
> forward(100)
> right(120)
> clear()
> It didn't work! It kept on saying that there was an indent and the first line was wrong. Help!


It would be most helpful if you gave us the exact error msg, in the same 
way that you copy-pasted the source-code.

"Turtle" is not part of the Python 'core'. It has to be added from the 
Python Standard Library (PSL).

My !GUESS! is that the Turtle library is not (yet) available on your 
system. Did you first "pip" or otherwise download the library?

(I have, and the code works happily)

WebRefs: (modify to suit the version of Python in-use)
https://docs.python.org/3/installing/index.html?highlight=pip
https://docs.python.org/3/library/turtle.html

-- 
Regards =dn