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
A type of computer usually has thousands of users. which of the following is most likely to be the type of computer?
Sunny_sXe [5.5K]
The macbook computer has about 9,000,000 gagets and in its websites about 80T links
4 0
3 years ago
Read 2 more answers
A network that has locations in different countries is considered a WAN.<br> a. Trueb. False
fiasKO [112]

Answer:

True.

Explanation:

Wide area network (WAN) can be defined as a telecommunication network that covers a wide range of geographical locations such as countries or regions across the world for the purpose of communication and sharing information and data between different users.

Hence, a network that has locations in different countries is considered a wide area network (WAN).

Generally, wide area network (WAN) makes it possible for various organizations to interconnect with their branch offices, headquarters and other multiple locations across the globe. Wide area network (WAN) usually span over a distance of 50 kilometers.

6 0
3 years ago
Prompt the user to enter four numbers, each corresponding to a person's weight in pounds. Store all weights in a list. Output th
Lesechka [4]

Answer:

# FIXME (1): Prompt for four weights. Add all weights to a list. Output list.

weight_one=float(input('Enter weight 1:\n'))

weight_two=float(input('Enter weight 2:\n'))

weight_three=float(input('Enter weight 3:\n'))

weight_four=float(input('Enter weight 4:\n'))

weights=[weight_one,weight_two,weight_three,weight_four]

print(weights)

# FIXME (2): Output average of weights.

average_weight=(weight_one + weight_two + weight_three + weight_four) / 4

print('Average weight:', "%.2f" % average_weight)

# FIXME (3): Output max weight from list.

weights.sort()

max_weight= weights[3]

print('Max weight:', "%.2f" % max_weight)

# FIXME (4): Prompt the user for a list index and output that weight in pounds and kilograms.

print(input('Enter a list index location (0 - 3):'))

print('Weight in pounds:', weights)

kilograms = float(weights) * 2.2

print('Weight in kilograms:')

# FIXME (5): Sort the list and output it.

weights.sort()

print(weights)

Explanation:

6 0
3 years ago
Helppppp ASAPPPP!!!!
Kobotan [32]

Answer:

I think it might be archive the less used data

Explanation:

archive doesnt mean delete but it does put away whatever you dont want to look at, so she still has all of the data with more space.

5 0
2 years ago
All users at your site are using the Bash shell. You want to set a variable that will apply to every user and always have the sa
podryga [215]

Explanation:

I assume you are on a single host.

To modify the .bashrc for all NEW users, you can edit/modify (with su privilege) the file

/etc/skel/.bashrc

save the file before creating new users.

Be sure to know what you're doing, and test the file before you use it host-wide.

For existing users, you can have them do the modifications/additions individually in case they have already modified their own version.

4 0
3 years ago
Other questions:
  • What will be returned when the following SQL statement is executed?
    5·2 answers
  • What type of encoding is this?<br>0x6a656c6c7966697368<br>cause I'm trying to decode it
    5·1 answer
  • &gt;&gt;&gt; import math &gt;&gt;&gt; print(math.Pi) 3.141592653589793 &gt;&gt;&gt; def print_volume(): print ("What is the radi
    12·1 answer
  • What kind of security features does Microsoft Security Analyzer promise?
    5·1 answer
  • Going to Grad School! In the College of Computing and Software Engineering, we have an option for students to "FastTrack" their
    11·1 answer
  • Think about some of the most memorable and forgettable games ever created. They can be games that were discussed in this unit or
    10·1 answer
  • Engineers at Edison Laboratories developed a _____ strip that allowed them to capture sequences of images on film.
    14·2 answers
  • Which of the following expressions yields an integer between 0 and 100, inclusive? Question 5 options: (int)(Math.random() * 100
    6·1 answer
  • Requests to retrieve data written in a language such as SQL are called…
    8·1 answer
  • Is anyone excited for the new matrix coming out ?
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!