King of Darts?

darts

In a previous assignment, we wrote code to draw an archery target. Today, your assignment is to simulate the throwing of three darts at that target.

Here’s how it will work:

  1. Draw your target on the window.
  2. Draw a “Throw” button.
  3. Draw a “Quit” button.
  4. Create a loop to repeat the following action three times…
  5. When the user clicks the “Throw” button, put a small circle on the target where their dart hits. This location should be generated randomly (use the random module to get random x and y values).
  6. After three throws, wait for the user to clock the “Quit” button, then close the program.

You may have to refer to older programs to remember how to create random numbers.

This program will be the basis for a dart throwing game that we will implement later.

Save this program with the name yourname-dartsimulation.py and submit it using this submission link.