Might be doing this wrong? (Turtle graphics)

Peter J. Holzer hjp-python at hjp.at
Fri Mar 22 16:47:35 EDT 2019


On 2019-03-21 00:44:46 -0400, Terry Reedy wrote:
> On 3/20/2019 7: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!
> 
> that suggests that what you typed above is not what you ran.

To be more specific, it suggests that jasonanyilian had some whitespace
at the beginning of a line. Unlike most programming languages, Python is
picky about whitespace at the beginning of lines (the "indentation").
This can be a problem when you copy and paste fragments of code.

        hp

-- 
   _  | Peter J. Holzer    | we build much bigger, better disasters now
|_|_) |                    | because we have much more sophisticated
| |   | hjp at hjp.at         | management tools.
__/   | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20190322/94f3070e/attachment.sig>


More information about the Python-list mailing list