1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Marina CMI [18]
3 years ago
5

Implement a program that requests the user to enter the x and y coordinates (each between 10 and 10) of a dart and computes whet

her the dart has hit the dartboard, a circle with center (0,0) and radius 8. If so, string It is in! should be printed on the screen.
Computers and Technology
1 answer:
igomit [66]3 years ago
4 0

Answer:

Following are the program in the Python Programming Language.

#import math package

from math import sqrt

#define function

def circle(x,y):

 #return the square root

 return sqrt( (x)**2 + (y)**2 )

#get input from the user

x = float(input("Enter first number between -10 and 10: "))

#get input from the user

y = float(input("Enter first number between -10 and 10: "))

#check condition

if(circle(x,y)<8):

 #then, print message

 print("It is in!")

#otherwise

else:

 #print message

 print("It is not in!")

<u>Output:</u>

Enter first number between -10 and 10: 1.5

Enter first number between -10 and 10: 2.6

It is in!

Explanation:

Here, in the following program in the Python Programming Language.

  • Define the function "circle" and pass the argument "x" and "y" then, return square root of x and y.
  • Set a variable "x" which get float type input from the user.
  • Set a variable "y" which get float type input from the user.
  • Set the if conditional statement to check that the function return the value less than 8 then, print the message.
  • Otherwise, it print the following message.
You might be interested in
Which part of the cryosphere comes directly from the atmosphere?
marin [14]
The answer to this question is C.
4 0
3 years ago
Read 2 more answers
SHORT ANSWERS:
dem82 [27]

Answer:

Hard drive Microsoft have the highest priority actions

7 0
3 years ago
What is the way of retrieving information from the Internet?
TEA [102]
We have to search the desired topic on the search box in the homepage
4 0
3 years ago
Read 2 more answers
What is true about the dilation?
madreJ [45]

Hey hey hey! I recently took the test and the answer is D | (• ◡•)|

7 0
3 years ago
Read 2 more answers
For the best night photographs, you’ll need to have a camera with a shutter speed of about 3 to 30 seconds
Alex_Xolod [135]
What are you trying to ask?

8 0
3 years ago
Other questions:
  • Which is NOT a type of SD card?
    8·2 answers
  • Select the best answer for the question. 19. While broadcasting a football game, the announcer exclaimed, "I can't believe it. C
    7·2 answers
  • Assume that play_list refers to a non-empty list, and that all its elements are integers. Write a statement that associates a ne
    7·1 answer
  • When Clara accesses the programs and documents on her computer by way of icons, she is said to be employing
    15·1 answer
  • When Mark’s organization implemented an IS, they faced the lack of confidence in users. Which strategy can improve user confiden
    11·1 answer
  • The program processes the command line arguments. The arguments indicate which signals to catch:________. A. The program emits a
    10·1 answer
  • Which application is a digital version of a manual typewriter? A. Database B. Presentation C. Spreadsheet D. Word processor
    8·2 answers
  • _KOH + _Cu(CIO3)2 - __KCIO3 +<br>_Cu(OH)2​
    12·1 answer
  • 14. Which of the following is NOT a
    6·2 answers
  • WILL GIVE BRAINLEIST PLZ HELP PLZ AND THANK YOU
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!