user3382238 user3382238 - 6 months ago 63
Python Question

i keep getting an error when i try and import turtle

import turtle
window = turtle.screen()


I get this error when I try and use the code above and not sure why, because its the same as my lecturers slide show, I just wanted to test it for myself.

Traceback (most recent call last):
File "/Users/ruairimangan-cliff/Desktop/Foundations of Computer Programming/week 4/Week 4 'Functions'.py", line 72, in <module>
window = turtle.screen()
AttributeError: 'module' object has no attribute 'screen'


Make sure you read your errors well! A single typo/ mistyped capital can cause errors like this!

Change :

window = turtle.screen()

to :

window = turtle.Screen()