Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

able to finish during lab ) . Only one partner should be logged on to their computer . The other partner looks on . The

able to finish during lab ). Only one partner should be logged on to their computer . The other partner looks on. The logged in partner (the coder ) writes and runs the code , explaining what they are doing to the other partner (the observer ), who can make suggestions and ask questions . Switch off after every test Partners should share their code using a cloud link or email at the end of class , since both partners need to submit individually to receive creit . Use this flow until you have implemented the following functionality in Point.py Point eq (self, other)- returns True iff self and other have the same x and y attributes Use at least two assertions in your unittest method TestPoint.test_eq : Use self.assertEqualto confirm that 2 points with the same x- and y-compare as equal Use self.assertNotEqualto confirm that 2 points with different and y-do not compare equal Point equidistant (self, other): returns True iff self and other are the same distance from the origin Use sqrt(x ^2+ y ^2) to find the distance from the origin (eg (x**2+y**2)**(1/2)) Use at least three assertions in your unittest method TestPoint.test_eq0 : Use self.assertEqual to confirm that 2 points with the same distance from origin and the same x and y attributes compare as equal Use self.assertEqual to confirm that 2 points with the same distance from origin but different x and y attributes compare as equal Use self.assertNotEqual to confirm that 2 points with different distances from origin not compare as equal within (self , distance , other)-returns iff self and other are within distance from each other -As above , use the pythagorean theorem to find the distance between two points x1)^2+(y2-y1)^2) Use at least 2 assertions As above , self.assertEqual for two points that are within some of each other and self.assertNotEqual0 for two points that are not within some of each other Reminders

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Fred R. McFadden, Jeffrey Slater, Mary B. Prescott

5th Edition

0805360549, 978-0805360547

More Books

Students also viewed these Databases questions

Question

Question What are the advantages of a written bonus plan?

Answered: 1 week ago