Error wn trtl Screen AttributeError Turtle object has no attribute Screen

0 votes
I am trying to code a python game (very inexperienced coder here) and am following instructions for the code. It is set up as the following currently:

#-----import statements-----
import turtle as trtl

#-----game configuration----
trtl_color = "red"
trtl_shape = "circle"
trtl_size = "2"

#-----initialize turtle-----
trtl = trtl.Turtle()
trtl.shape(trtl_shape)
trtl.color(trtl_color)
trtl.pensize(trtl_size)

#-----game functions--------

#-----events----------------
wn = trtl.Screen()
wn.mainloop()

It gives me the error mentioned in the title and I have no idea how to fix it. May someone please help?
Nov 3, 2020 in Python by anonymous
• 120 points

edited Nov 3, 2020 by Gitika 2,745 views

1 answer to this question.

0 votes

Hi, @There,

It requires a very simple hack to get over this error. Python is case sensitive.

Replace

wn = trtl.Screen()

with the following:

wn = trtl.screen()

I hope the trick will help you!! Let me know if it worked.!! 



answered Nov 3, 2020 by Gitika
• 65,770 points

Related Questions In Python

0 votes
1 answer

Python error "AttributeError: '_Screen' object has no attribute 'mainloop'" python module turtle

Hey @Nagya, replace  wn.mainlopp() with turtle.mainloop() ...READ MORE

answered Jun 19, 2019 in Python by Faiza
7,247 views
+1 vote
3 answers

Python error "AttributeError: 'Turtle' object has no attribute 'Shape'"

Hey @Nagya, replace python.Shape("Square") with the following: python.shape("square") Python is case ...READ MORE

answered Jun 19, 2019 in Python by Faiza
21,591 views
0 votes
2 answers

Python Pandas error: AttributeError: 'DataFrame' object has no attribute 'rows'

Try this: data=pd.read_csv('/your file name', delim_whitespace=Tru ...READ MORE

answered Dec 10, 2020 in Python by anonymous
• 82,840 points
132,569 views
0 votes
1 answer

Python error "AttributeError: 'str' object has no attribute 'casefold'"

Check your python version. Casefold is possible ...READ MORE

answered Jul 4, 2019 in Python by Yesha
6,393 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,434 views
0 votes
1 answer
+1 vote
1 answer
0 votes
1 answer

Getting error "AttributeError: 'Screen' object has no attribute 'title' on line 8"

Hey @TedTickles,  Replace  wn.update() with turtle.up ...READ MORE

answered Dec 24, 2020 in Python by Gitika
• 65,770 points
4,047 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP