Ask Question
21 January, 06:08

A dartboard of radius 10 and the wall it is hanging on are represented using the twodimensional coordinate system, with the board's center at coordinate (0,0). Variables x and y store the x - and y-coordinate of a dart hit. Write an expression using variables x and y that evaluates to True if the dart hits (is within) the dartboard, and evaluate the expression for these dart coordinates:

+2
Answers (2)
  1. 21 January, 07:21
    0
    See Explanation Below

    Step-by-step explanation:

    Given that radius = 10 and variables x and y store the x - and y-coordinate of the dart.

    The expression written in Python Programming Language is as follows.

    import math

    # Initialise radius to 10

    radius = 10

    # Accept integer input for x and y

    x = int (raw_input ("x co-ordinate: "))

    y = int (raw_input ("y co-ordinate: "))

    # Calculate distance

    distance = math. sqrt (x*x + y*y)

    # Print distance

    print (distance)

    # Compare distance to radius

    if dist
    print ("Hit")

    else:

    print ("Miss")

    # End of program
  2. 21 January, 09:05
    0
    Refer below for the explanation.

    Step-by-step explanation:

    //math importing

    import math

    //initializing radius 10 as per in the question

    r = 10

    //input for x coordinate

    A = int (raw_input ("Enter number:"))

    //input for y coordinate

    B = int (raw_input ("Enter number:"))

    Distance = math. sqrt (a*a + b*b)

    print Distance

    if Distance

    print "gain"

    else:

    print "lost"
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “A dartboard of radius 10 and the wall it is hanging on are represented using the twodimensional coordinate system, with the board's center ...” in 📙 Mathematics if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers