This homework has the following goals:
rings of red, blue, black and white. Each ring has the same width, which is the same as the radius of the yellow circle. Write a program that draws such a target.
Hint : Objects drawn later will appear on top of objects drawn earlier.
Hint: You will ask the user for the diameter of the archery target. How is this related to the radius of the inner circle? The larger circles’ radii can be expressed as multiples of this value.
Submit your responses to Problem 1 as two separate modules (target1.py and target2.py).
This program allows the user to draw a line segment and then displays some graphical and textual information about the line segment.
Input: Two mouse clicks for the end points of the line segment.
Draw the midpoint of the segment in cyan.
Draw the line.
Print the length and the slope of the line.
Formulas: dx = x2 – x1
dy = Y2 – Y1
slope = dy / dx
length = sqrt(dx2 + dy2)
Hint: To create labels that combine text and numerical values, you may find using the type conversion function str(<expr>) helpful. For more, see page 152 of the textbook (2nd edition page 146).
Submit your responses to Problem 2 as two separate modules (line1.py and line2.py).
As you have done on the earlier homeworks, add comments to your Python programs describing what a line or a block of code is meant to accomplish, including your name, and other important details as a title header at the beginning of the module.
Submit all of your python programs for this assignment as .py files, a total of 4 modules.