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
Write a python program to check whether the number is divisible by 7. If its divisible, print its divisible otherwise find previ
Stells [14]

f = int(input("Enter a number: "))

if(f%7==0):

   print("It's divisible by 7.")

else:

   if(f<7):

       print("7")

   else:

       print(str(f-(f%7))+", "+str(f+(7-(f%7))))

7 0
1 year ago
Does anybody know how to unlock websites from school computer
Grace [21]

Answer:

yes go to settings then apps

Explanation:

that's how I did mines

8 0
2 years ago
Queues can be represented using linear arrays and have the variable REAR that point to the position from where insertions can be
Levart [38]

Answer:

8

Explanation:

7 0
2 years ago
List 10 programs or applications on your computer other than any Microsoft office programs
Fofino [41]
Dropbox
Mozilla Firefox, Google Chrome
Gmail, Mozilla Thunderbird
CDburnerXP
Putty, Netflix,
Paint.net, Filezilla
3 0
3 years ago
When you sustain program implementation by staying true to the original design, it is termed A. Goals and objectives B. Program
Naya [18.7K]

Answer:

Program fidelity

Explanation:

7 0
3 years ago
Other questions:
  • To extend the bottom border of a hyperlink across the complete width of a navigation list, change the ____ property of each hype
    9·1 answer
  • What is a good voltage measurement on a brand new, 6 volt golf cart deep cycle battery after the first charging?
    10·1 answer
  • What authentication protocol is ticket-based and is used by windows computers that are members of an active directory domain?
    13·1 answer
  • Where can you find gradpoint answers
    13·2 answers
  • What dose AUP stand for??????????
    15·2 answers
  • Which os the following is NOT true about the proof of work concept?
    8·1 answer
  • How does the post process alert the user if it detects a hardware problem during the post process?
    6·1 answer
  • 2.3 Code Practice: Question 1
    5·1 answer
  • A gui allows you to interact with objects on the screen such as icons and buttons true or false
    7·1 answer
  • Database queries is an example of
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!