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
ludmilkaskok [199]
3 years ago
10

Write a new method in the Rectangle class to test if a Point falls within the rectangle. For this exercise, assume that a rectan

gle at (0,0) with width 10 and height 5 has open upper bounds on the width and height, i.e. it stretches in the x direction from [0 to 10), where 0 is included but 10 is excluded, and from [0 to 5) in the y direction. So it does not contain the point (10, 2). These tests should pass:
Computers and Technology
1 answer:
algol [13]3 years ago
7 0

Answer:

Explanation:

The Rectangle and Point class is not provided in this question but was found online. Using that code as guidance I created the following method named contains. This method takes in a Point object and checks to see if the x-axis point is inside the parameters of the Rectangle class and then checks the same for the y-axis. If it is inside the Rectangle then the method returns true otherwise it returns false.

def contains(self, point):

       return self.width > point.x >= self.corner.x and self.height > point.y >= self.corner.y

You might be interested in
C++ <br> see attached file for quesion
sveticcg [70]
The picture doesn’t load.
7 0
3 years ago
Developed the first compiler and conducted work that led to the development of COBOL ?
zimovet [89]

Answer:

Grace Hopper.

Explanation:

Grace Hopper was a US Naval Rear Admiral and an American computer scientist who was born on the 9th of December, 1906 in New York city, United States of America. She worked on the first commercial computer known as universal automatic computer (UNIVAC), after the second World War II.

In 1953 at the Remington Rand, Grace Hopper invented the first high-level programming language for UNIVAC 1 by using words and expressions.

Additionally, the high-level programming language known as FLOW-MATIC that she invented in 1953 paved the way for the development of common business-oriented language (COBOL).

Hence, Grace Hopper developed the first compiler and conducted work that led to the development of COBOL.

6 0
3 years ago
Xét bài toán QUẢN LÝ ĐÀO TẠO. Việc quản lý đào tạo tại một trường đại học có thể được mô tả vắn tắt như sau: Danh sách Giảng viê
gulaghasi [49]

Answer:

write in an English so we can help with that

5 0
3 years ago
A retail store stocks two types of shirts A and B. These are packed in attractive cardboard boxes. During a week the store can s
antiseptic1488 [7]
300 of A and 300 of b
7 0
2 years ago
Explain with the help of an example that family background affects the entrepreneurial behaviour of people
marta [7]

Answer:

Like other aspects, family background also affects the entreptrneurial behaviour of people as entrepreneurship directly depends on people and people are affected to big extent by the family background.

Explanation:

  • According to the research statistics 25% of the variation in decisions of individuals to become employed to self is explained by family background and influence of the community.
  • It also suggested that the entrepreneurship depends upon sibling correlation and shared genes.
  • It is greatly affected by characteristics of parents and family members including sibling peer effects, income, education, self employment, neighbourhood effects and incorporation.
3 0
4 years ago
Other questions:
  • Shaniya has misspelled a scientific name in her biology report. She needs to correct it, but she has no access to a computer. Sh
    13·2 answers
  • Median of a sample If the distribution is given, as above, the median can be determined easily. In this problem we will learn ho
    15·1 answer
  • OSHA standards appear in the ___________ and are then broken down into ____________.
    9·1 answer
  • is a shell program in Windows that holds individual utilities called snap-ins, designed for administration and troubleshooting.
    11·1 answer
  • Google Docs, MS Word, Google Slides, MS PowerPoint, Google Sheets, MS Excel In your opinion which software in each category is e
    7·2 answers
  • The only type of donation you can make to a not for profit is to donate money
    14·2 answers
  • Declared inside a function and is only available within the function in which it is declared.
    13·1 answer
  • Complete function PrintPopcornTime(), with int parameter bagOunces, and void return type. If bagOunces is less than 2, print "To
    5·1 answer
  • Debug the program so it prints the factorial of a positive integer entered by the user. This is calculated by multiplying all th
    9·1 answer
  • An engineer has reported that a printer is no longer working and needs troubleshooting. You have been informed that there is a p
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!