Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lab Assignment 4-It's a Bullseye CSCI 251 Problem Statement For lab assignment 4, you will create a very simplified game of darts. Your target will

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Lab Assignment 4-It's a Bullseye CSCI 251 Problem Statement For lab assignment 4, you will create a very simplified game of darts. Your target will have just two regions, blue and white, as shown below, where darts hitting the blue region are worth a point and darts hitting the white region are worth 3 points. The blue region is inches entered by the user, some value greater than 3 (10 in this example). the white region is just 3 inches in diameter. We will assume that you have a good enough shot that you will hit the target every time. Continue throwing darts until you reach a score of at least 25, outputting how many darts you had to throw to get your score. Hint: If you think of the dartboard as concentric circles in the center of a coordinate system as shown below, you can randomly generate x and y values to determine the location of the dart within the region the (x,y) point). Be sure your random values for both x and y are for the larger circle (NOTE: the 10-inch diameter outer circle is just an example. You must enter this value): 5 0.5 points 2 3 4 5-. -4-3-2-1 1 The Pythagorean Theorem gives the distance from any point (x, y) to the center (0, 0) as follows

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

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

More Books

Students also viewed these Databases questions

Question

Find dy/dx if x = te, y = 2t2 +1

Answered: 1 week ago