Ask Question
21 August, 13:36

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:

+1
Answers (2)
  1. 21 August, 13:40
    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 August, 13:44
    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?
Find 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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers