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 is this tool called?
kondor19780726 [428]
Is there a picture????????
4 0
4 years ago
Read 2 more answers
The kitchen in any café is a noisy place. To make sure the orders which you have carefully written down on your notepad make it
Levart [38]

Answer:

file_name = 'orders.txt'

file_obj = open( file_name, 'r' )

lines = file_obj.read()

print(lines.upper(), end = '')

Explanation:

  • Define the name of the file .
  • Use the built-in open function to open the file in read mode .
  • Use the built-in read function to read the file and assign this to lines variable.
  • Finally display the lines by converting them to capital alphabets by using the built-in upper() function.
5 0
3 years ago
"Which layer of the OSI seven-layer model keeps track of a system's connections to send the right response to the right computer
ExtremeBDS [4]

Answer:

The Session layer (Layer 5)

Explanation:

The OSI (Open Systems Interconnection) seven-layer model is a reference model that explains how devices (or applications) communicate over the network. The model consists basically of seven different layers which are;

i. Layer 1 or the physical layer

ii. Layer 2 or the data-link layer

iii. Layer 3 or the network layer

iv. Layer 4 or the transport layer

v. Layer 5 or the Session layer

vi. Layer 6 or the presentation layer

vii. Layer 7 or the application layer.

Out of the seven layers, the session layer (layer 5) keeps track of a system's connections to send the right response to the right computer by setting up, coordinating and managing these connections. It controls, establishes and maintains the connection between multiple computers or applications on a computer.

8 0
3 years ago
You are able to drag a cell to a new location by pointing to the cell border until the pointer displays a _______ arrow, and the
ivann1987 [24]
I think its D, double-headed if I remember right. If this is brainiest can you mark it, please! I am trying to rank up. Thanks, hun!
7 0
3 years ago
Read 2 more answers
A user has requested to have an extra 4GB of memory installed on a laptop. During the Installation process, which of the followi
9966 [12]

Answer: C) Access panel

Explanation:

 During the installation process, access panel is used remove by the technician for installation extra 4 GB memory in the laptop. As, window access panel is useful to change the window settings.

We need to access the panel in the laptop to add extra 4 GB memory in the laptop as, the access panel contain the memory banks in the system. Then, open that particular panel for upgrade the memory in the laptop and also remove the unnecessary memory.

8 0
4 years ago
Other questions:
  • Driving while wearing headphones or earphones
    12·2 answers
  • What is the very first thing a user usually must do to gain access to a secure computer?
    7·1 answer
  • What tool do you use to secure remote access by users who utilize the internet??
    7·1 answer
  • Write and run a Python program that asks the user for a temperature in Celsius and converts and outputs the temperature in Fahre
    10·1 answer
  • A light or optical microscope most commonly used is called a(n) _____. bright-field microscope dark-field microscope electron mi
    8·2 answers
  • Complete the sentence
    6·2 answers
  • What is processing for a computer?​
    5·1 answer
  • Anne wants to hide her age by converting it from 13 to 1101. Which number system is Anne converting to?
    13·1 answer
  • True or False? Popular sites are always mean accurate.
    14·2 answers
  • TO Cloud
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!