Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9177973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:26:46+00:00 2026-06-17T17:26:46+00:00

So here is the code I have, is there a way to code so

  • 0

So here is the code I have, is there a way to code so that when the ISS and rocket meet (at the same position) destory the window and create a new Tkinter window?

from turtle import *

def move(thing, distance):
    thing.circle(250, distance)

def main():
    rocket = Turtle()
    ISS = Turtle()
    rocket.speed(10)
    ISS.speed(10)
    counter = 1
    title("ISS")
    screensize(750, 750)
    ISS.hideturtle()
    rocket.hideturtle()
    ISS.penup()
    ISS.left(90)
    ISS.fd(250)
    ISS.left(90)
    ISS.showturtle()
    ISS.pendown()
    rocket.penup()
    rocket.fd(250)
    rocket.left(90)
    rocket.showturtle()
    rocket.pendown()

    while counter == 1:
        move(ISS, 3)
        move(rocket, 4)

Thank You!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T17:26:47+00:00Added an answer on June 17, 2026 at 5:26 pm

    http://docs.python.org/2/library/turtle.html#turtle.position

    “Return the turtle’s current location (x,y) (as a Vec2D vector).”

    However, due to floating point errors, you should consider them overlapping even if they are very slightly apart, e.g.

    epsilon = 0.000001
    
    if abs(ISS.xcor() - rocket.xcor()) < epsilon and abs(ISS.ycor() - rocket.ycor()) < epsilon:
        do stuff
    

    If you want to pretend they are circles and ISS has a radius of r1 and the rocket has a radius of r2, then you can measure distance like:

    sqrt((ISS.xcor() - rocket.xcor())**2 + (ISS.ycor() - rocket.ycor())**2) < (r1 + r2)
    

    If this is true, they are overlapping circles.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way that I can execute the same line of code for
Here is the code I have to create an UIAlertView with a textbox. UIAlertView
enter code here I have a ListView that have a different Layout XML for
I have some code here that uses bitsets to store many 1 bit values
Is there a way to write a C code that allow us to determine
Is there a way in Delphi 2009 to have a section of code conditionally
Is there a way to Interupt a sleeping thread? If I have code similar
Is there any way that you may create a puzzle of three pieces with
Here is the code I have written for Rectangle class. class Rectangle (l: Double,
enter code here I have a table on SQL server 2005 with bigint primary

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.