Question: Directions Place the graphics.py file (available fromhttp://mcsp.wartburg.edu/zelle/python/) in the same location where you will create the program. the program should compute the intersection of a

Directions

  • Place the graphics.py file (available fromhttp://mcsp.wartburg.edu/zelle/python/) in the same location where you will create the program.
  • the program should compute the intersection of a circle with a horizontal line and displays the information textually and graphically.
  • Input: Radius of the circle and they-intercept of the line. Prompt the user for these values.
  • Output: Draw a circle centered at (0,0) with the given radius in a window with coordinates running from (-10,-10) to (10,10).
  • Draw a horizontal line across the window with the giveny-intercept.
  • Draw the two points of intersection in red.
  • Print out thexvalues of the points of intersection in the upper left-hand corner of the window.
  • Formula for the intersection values ofx:

whereris the radius andyis they-intercept.

  • When the user clicks anywhere on the window, it should close.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!