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]
4 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]4 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
The word blog is made from what two terms?
mafiozo [28]
• web + log = blog •
3 0
4 years ago
In general, the right amount of time to do freewriting is
zlopas [31]
THE correct answer is c 10 minuets
4 0
3 years ago
Read 2 more answers
Write a Python function that takes a positive integer N and returns the factorial of N, i.e., N! The factorial of N, denoted N!,
sesenic [268]

Answer:

The python function is as follows:

def fact(N):

   factorial = 1

   for i in range(1,N+1):

       factorial = factorial * i

   return(factorial)

Explanation:

This line defines the function

def fact(N):

This line initializes the product of 1 to N to 1

   factorial = 1

This line iterates through 1 to N

   for i in range(1,N+1):

This line calculates the product of 1 to N i.e. factorial

       factorial = factorial * i

This line returns the factorial

   return(factorial)

6 0
3 years ago
Ruby is a graduate fresh out of a fashion school in New York. Ruby is not very interested in finding work in a fashion house. In
Lelu [443]
Ruby can take up movie design in flim television ' or theater production
7 0
4 years ago
12. What was the trade Howard offered to Death?​
Pachacha [2.7K]

Answer:

His life

Explanation:

5 0
3 years ago
Other questions:
  • Write a program totake a depth (in kilometers) inside the earth as input data;compute
    15·1 answer
  • Define the method object inc_num_kids() for personinfo. inc_num_kids increments the member data num_kids. sample output for the
    11·1 answer
  • When you save a Notepad file for the first time, you must also A. print a copy for your records. B. give it a name. C. check the
    11·1 answer
  • What tool do you use to secure remote access by users who utilize the internet??
    7·1 answer
  • What do we call the time it takes for all of the sub-pixels on the panel to go from pure black to pure white and black again
    6·1 answer
  • you are concerned with security at your company and want to implement a technology that requires no configuring on the users sid
    15·1 answer
  • Two technicians are discussing a parasitic load test. Technician A says that the parasitic load is measured with an ammeter Tech
    13·1 answer
  • In this lesson you wrote code to make the turtle draw squares. Briefly describe how the code for
    11·1 answer
  • A bulb has a resistance of 15Ω and is rated at 3A. What is the maximum voltage that can be applied across the bulb?
    7·1 answer
  • Travelers should keep their profile information up-to-date. which is not an option for a traveler to update their own profile in
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!