Turtle turtle.Screen() not working
-
I am on my ipad and i just bought pythonista. I wanted to create something in turtle but i kept on getting the error: module ‘turtle’ has no attribute ‘Screen’
The code:import turtle as t playerAscore=0 playerBscore=0 window = t.Screen() window.title("pong ping") window.bgcolor("black") window.setup(width=800,height=600) window.tracer(0)
I am aware this turtle module is possibly old or unfinished but if there is anything i can do please let me know.a
-
Same error happens
-
last edited by
-
As a check:
import turtle print(turtle.__file__)
-
@cvp I’m new to this, what do you mean exactly?
-
@oDuty Assume you have written a script named turtle.py, the import turtle you do would import your own script, not the standard one. That's why @JonB advices you to run his little script to see where resides the imported turtle. Try his little script and post the result.
-
Add those two lines to the top of the script. Copy the result and paste here.
a common problem is that you created a file called turtle.py where you intended to try out the turtle module. But when you type import turtle, it imports your file, not the actual turtle module.
-
@JonB sorry, didn't know you were there...
-
so how do we fix the file turtle.py problem
-
last edited by