Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write in python. Regrence the pictures, read 2 nd page first. First page has what that refrences. Problem 1 6 page 1 9 6 :

Write in python.
Regrence the pictures, read 2nd page first. First page has what that refrences.
Problem 16 page 196:
16. Archery scorer. Write a program that draws an archery target (see Pro-gramming Exercise 2 from Chapter 4) and allows the user to click five times to represent arrows shot at the target. Using five-band scoring, a bulls-eye (yellow) is worth 9 points and each successive ring is worth 2 fewer points down to 1 for white. The program should output a score for each click and keep track of a running sum for the entire series.
Exercise 2 from chapter 14 : from graphics import *
def main():
win = GraphWin (4 Target", 400,400)
win.setBackground ("Black")
win.setCoords (-6,-6,6,6)
shepe = Circle Point (0,0),5
shape.draw(win)
shape, setFill("white")
shape2= Circle Point (0,0),4
shape2.draw(win)
shape2,setFiu("black")
shepe 3= Circle Point (0,0),3
shape3.draw(win)
shape3 setFill("blue")
shepe4= Circle Point (0,0),2
shape4.draw(win)
shape4.setFil("red")
shape Point (0,0),1
shape5.draw(win)
shape5.setFil("yellow")
main()
Write a program to be an archery scorer (see problem 16 on page 196). Your program should be fully graphical and include appropriate prompts for the user. T image below shows how it might look after 3 shots.
"Arrow" is the point value of the last arrow fired. and "Score" is the running total.
Your program should have the following helper functions:
def draw_target(win):
# draws an archery target in win (center (0,0), bullseye radius is 1
def get_shot(win):
# gets a mouse click in win, draws a circular shot and returns the point clicked
def score(point):
# returns the score for an arrow landing at point
Have your main window be 500500 pixels. Your target should be centered at (0.0) and the Bullseye (yellow) circle should have radius 1(ala lab 4b). Make sure you get the program working according to these specifications. You will not get credit for a program that takes a different approach.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle9i Database Administrator Implementation And Administration

Authors: Carol McCullough-Dieter

1st Edition

0619159006, 978-0619159009

More Books

Students also viewed these Databases questions