0

I used the function screensize() and it told me that my window was (400, 300). I need to get to the top left hand corner to draw some stuff, but when I put in (-400, 300), my turtle goes way off the window. Is there any other function I can use to get the size of my turtle window?

martineau
124k29 gold badges181 silver badges319 bronze badges
asked Oct 14, 2020 at 20:40
2
  • I think by default, the screen center is (0,0). The top left corner is (-200, 150). At x = -400 the turtle is 200 pixels left of the screen. Commented Oct 14, 2020 at 23:15
  • Does this answer your question? screensize of turtle in python Commented Oct 15, 2020 at 16:45

1 Answer 1

0

The point 0, 0 is in the center of the screen, so if you want to go to the top left corner, you need to use turtle.goto(200, 150). A problem also could be that if you used setup() to create the window, screensize() will return the default, which is (400, 300), even if you screen is bigger.

answered Oct 21, 2020 at 15:25
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.