Question #3: is a data point within a rectangle? (4 points) write a

  Question #3: Is a data point  within a rectangle? (4 points) Write a function isIn() which returns  True ifa point is within a rectangle specined by two sets of coordinates  and False if the point is outside the rectangle. The function should  accept three parameters: the first parameter is a set of coordinates  which defines one of the corners of the rectangle, the second parameter  is also a set of coordinates that defines the second comer, the third  set of coordinates defines a single point which is being tested. For  example .isIn((1,2), (3,4), (1.5, 3.2)) should return True  .isIn((4,3.5), (2,1), (3, 2)) should return True .isIn((-1,0), (5,5),  (6,e)) should return False isin((4,1), (2,4), (2.5,4.5)) should return  False Test your function with at least 2 different sets of data points  in addition to the examples above. 1. If the point being tested is on  the side of the rectangle, consider it to be within the rectangle. For  example, if the rectangle is defined as (1,2), (3,4) and the point is  (2,2), the function should retum True 2. In this assignment, we assume  that the edges of the rectangle are parallel to coordinate axes. 3. We  also assume that the first parameter does not always represent the left  comer of the rectangle and the second parameter is not always the right  comer. The function should work correctly either way. Please note the  second test condition above where the first parameter, (4,3.5) ,  represents the top-right comer and the second parameter, (2,1)  represents left -bottom corner In [: def isIn(firstCorner-(e,0),  secondCorner-(0,8), point-(,0)): # YOUR CODE HERE In []: In []: Question  #4: Are all points within a rectangle? (4 points) Modity your function  from the previous question so it takes a list of points rather than a  single point and returns True only ir all points in the list are in the  rectangle For example . allIn( (,), (5,5), [(1,1), (,e), (5,5)]) should  return True but allIn( (e,e), (5,5), [(1,1), (e,e), (5,6)]) should  return False Use the same assumption as above about the placement of the  points and how rectangle is defined Test your function with at least 3  difterent sets of data points In []: def allIn(firstCorner-(8,e),  secondcorner-(e,), pointList-[]): # YOUR CODE HERE In []: In []: In []:  In :   

 Question #3: Is a data point within a rectangle? (4 points) Write a function isIn() which returns True ifa point is within a rectangle specined by two sets of coordinates and False if the point is outside the rectangle. The function should accept three parameters: the first parameter is a set of coordinates which defines one of the corners of the rectangle, the second parameter is also a set of coordinates that defines the second comer, the third set of coordinates defines a single point which is being tested. For example .isIn((1,2), (3,4), (1.5, 3.2)) should return True .isIn((4,3.5), (2,1), (3, 2)) should return True .isIn((-1,0), (5,5), (6,e)) should return False isin((4,1), (2,4), (2.5,4.5)) should return False Test your function with at least 2 different sets of data points in addition to the examples above. 1. If the point being tested is on the side of the rectangle, consider it to be within the rectangle. For example, if the rectangle is defined as (1,2), (3,4) and the point is (2,2), the function should retum True 2. In this assignment, we assume that the edges of the rectangle are parallel to coordinate axes. 3. We also assume that the first parameter does not always represent the left comer of the rectangle and the second parameter is not always the right comer. The function should work correctly either way. Please note the second test condition above where the first parameter, (4,3.5) , represents the top-right comer and the second parameter, (2,1) represents left -bottom corner In [: def isIn(firstCorner-(e,0), secondCorner-(0,8), point-(,0)): # YOUR CODE HERE In []: In []: Question #4: Are all points within a rectangle? (4 points) Modity your function from the previous question so it takes a list of points rather than a single point and returns True only ir all points in the list are in the rectangle For example . allIn( (,), (5,5), [(1,1), (,e), (5,5)]) should return True but allIn( (e,e), (5,5), [(1,1), (e,e), (5,6)]) should return False Use the same assumption as above about the placement of the points and how rectangle is defined Test your function with at least 3 difterent sets of data points In []: def allIn(firstCorner-(8,e), secondcorner-(e,), pointList-[]): # YOUR CODE HERE In []: In []: In []: In : 

Calculate your order
Pages (275 words)
Standard price: $0.00
Client Reviews
4.9
Sitejabber
4.6
Trustpilot
4.8
Our Guarantees
100% Confidentiality
Information about customers is confidential and never disclosed to third parties.
100% Originality
The main foundation of any academic writing company is offering 100% originality in their orders. Make your order today and benefit from anti-plagiarized papers.
Customer Support 24/7
You can rest assured that our customer support team is consistently available to solve any difficulties and take your orders 24/7.
Money Back
If you're confident that a writer didn't follow your order details, ask for a refund.

Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
$0.00
Power up Your Academic Success with the
Team of Professionals. We’ve Got Your Back.
Power up Your Study Success with Experts We’ve Got Your Back.