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
hichkok12 [17]
3 years ago
12

Write a program that prompts the user to enter a point (x, y) and checks whether the point is within the rectangle centered at (

0, 0) with width 10 and height 5.  For example, (2, 2) is inside the rectangle and (6, 4) is outside the rectangle.

Computers and Technology
1 answer:
Serga [27]3 years ago
5 0

Answer:

## http://pastebin.com/nQWtHb3B

#use above link for formatted program #Python3

c=[float(cord) for cord in input('Enter a point with 2 coordinate :').split(' ')]

base=[0,0]

w=10

h=5

if((abs(c[0]-base[0])<= float(w)/2) and (abs(c[1]-base[1])<= float(h)/2)):

print('Point (',c[0],', ',c[1],') is in the rectange')

else:

print('Point (',c[0],', ',c[1],') is not in the rectange')

You might be interested in
What led to fall of axum?
stiks02 [169]
The main factors that led to the fall of the Aksum in the seventh century were climate change and the obstruction of international trade routes around the Red Sea brought on by the growing supremacy of the Muslims in Ethiopia.<span> Other contributing factors included a reduced crop yield due to excess cultivation of land, Persian interference and the rise of Christianity in the region.</span>
3 0
3 years ago
Read 2 more answers
C++ Question: what is in the blanks?
Igoryamba

You didn't specify what the program should output, so there are many possibilities that result in a working program. It *looks* like this was intended:

int x = 24;

int y;

y = x-12;

cout<<y<<endl;

and it will display 12.

8 0
3 years ago
You configured the IP address and DNS name of a new internal web server named WEB3. Your first test from a web browser on your w
bonufazy [111]

Answer:

I would reset the Domain Name System (DNS)

Explanation:

One factor that could lead to the "Site Cannot Be Reached" error is DNS "poisoning". Another is invalid DNS cache. Both can be caused by an attack on the system by people trying to spoof the system. Spoofing ensures that even when the right address is entered, it leads one to another web address.

One way to quickly reset the DNS is to run ipconfig /flushdns

This helps to clear the DNS cache.

Once the DNS cache has been successfully flushed, the system returns a confirmatory message that reads “flushed the DNS resolver cache”.

The systems administrator can now proceed to reconfigure the IP address(es)

Cheers

3 0
3 years ago
How to disable iCloud music library? When I go into settings or music or even iTunes the iCloud music library switch doesn’t pop
Komok [63]
It may be a glitch in the settings, or it may a parental block
8 0
3 years ago
How do I translate my Flowchart into Psuedocode?
harkovskaia [24]

Answer:

Step 1

Open the flowchart and locate the startinglocation on the chart.

Step 2

Write the pseudocode that is equivalent to the rectangular process boxes in your diagram.

Step 3

Write the pseudocode for the diamond-shaped decision boxes in your diagram.

Step 4

Write the pseudocode for the end terminator of the flowchart.

Combine all of your converted statements above and you have a flowchart that has been converted to pseudocode.

8 0
3 years ago
Other questions:
  • Go to the Creamy Ice Corporation passage on the next page. Insert the trademark sign after the word “Corporation'' in the first
    9·1 answer
  • Which of the following formats can algorithms NOT be written in:
    13·1 answer
  • Rachel wants to post content from digital cameras on the web. Which online tool will help Rachel to post and edit content on a w
    5·1 answer
  • Helpppp plsssss!!!<br><br>thanks.
    7·1 answer
  • When designing a suitable and safe flexibility training program, you should set reasonable and appropriate goals depending on wh
    15·1 answer
  • Given an array arr, of type int, along with two int variables i and j, write some code that swaps the values of arr[i] and arr[j
    11·1 answer
  • PrimeFactorization.java: Write a program that begins by reading in a series of positive integers on a single line of input and t
    12·1 answer
  • Use the drop-down menus to answer the questions.
    6·1 answer
  • In Fantasy Football, participants compete against one another by choosing certain players from different NFL teams that they thi
    14·1 answer
  • If you anticipate running a particular query often, you can improve overall performance by saving the query in a special file ca
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!