Skip to content
Advertisement

Turtle graphic not running?

i’m more of a backend web developer and this is for a friend of mine but i have this issue with turtle where her code wont run and i keep getting syntax errors saying certain things aren’t defined. Heres the code

JavaScript

Advertisement

Answer

If you use import turtle then you have to use turtle.penup(), turtle.setposition(), etc.

JavaScript

enter image description here


Original code would work if you would use from turtle import * but import * is not preferred (PEP 8 — Style Guide for Python Code)

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement