-
Notifications
You must be signed in to change notification settings - Fork 72
Lesson 13 solutions #694
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Lesson 13 solutions #694
Conversation
|
|
||
|
|
||
| def point_in_circle(point, circle): | ||
| if (point.x - circle.center.x) * (point.x - circle.center.x) + (point.y - circle.center.y) * ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E501 line too long (98 > 79 characters)
| rectangle = Rectangle(20, 10, Point(120, 100)) | ||
| print("Point:" + str(point)) | ||
| print("Is point inside the circle? " + str(point_in_circle(point, circle))) | ||
| print("Is rectangle inside the circle? " + str(rect_in_circle(rectangle, circle))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E501 line too long (86 > 79 characters)
| print("Point:" + str(point)) | ||
| print("Is point inside the circle? " + str(point_in_circle(point, circle))) | ||
| print("Is rectangle inside the circle? " + str(rect_in_circle(rectangle, circle))) | ||
| print("Is rectangle overlapping the circle? " + str(rect_circle_overlap(rectangle, circle))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E501 line too long (96 > 79 characters)
| book1 = Books("Uwiklanie", "Zygmunt Miloszewski", 2007) | ||
| book2 = Books("Uwiklanie", "Zygmunt Miloszewski", 2007) | ||
| book3 = Books("Hasztag", "Remigiusz Mroz", 2018) | ||
| print("Book1: author: {}, title: {}, year: {}".format(book1.author, book1.title, book1.year)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E501 line too long (97 > 79 characters)
| book2 = Books("Uwiklanie", "Zygmunt Miloszewski", 2007) | ||
| book3 = Books("Hasztag", "Remigiusz Mroz", 2018) | ||
| print("Book1: author: {}, title: {}, year: {}".format(book1.author, book1.title, book1.year)) | ||
| print("Book2: author: {}, title: {}, year: {}".format(book2.author, book2.title, book2.year)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E501 line too long (97 > 79 characters)
| book3 = Books("Hasztag", "Remigiusz Mroz", 2018) | ||
| print("Book1: author: {}, title: {}, year: {}".format(book1.author, book1.title, book1.year)) | ||
| print("Book2: author: {}, title: {}, year: {}".format(book2.author, book2.title, book2.year)) | ||
| print("Book3: author: {}, title: {}, year: {}".format(book3.author, book3.title, book3.year)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E501 line too long (97 > 79 characters)
| print("Book2: author: {}, title: {}, year: {}".format(book2.author, book2.title, book2.year)) | ||
| print("Book3: author: {}, title: {}, year: {}".format(book3.author, book3.title, book3.year)) | ||
| attributes_list = ['title', 'author', 'year'] | ||
| print("Are book 1 and book 2 equal? " + str(shallow_compare(book1, book2, attributes_list))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E501 line too long (96 > 79 characters)
| print("Book3: author: {}, title: {}, year: {}".format(book3.author, book3.title, book3.year)) | ||
| attributes_list = ['title', 'author', 'year'] | ||
| print("Are book 1 and book 2 equal? " + str(shallow_compare(book1, book2, attributes_list))) | ||
| print("Are book 1 and book 3 equal? " + str(shallow_compare(book1, book3, attributes_list))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E501 line too long (96 > 79 characters)
No description provided.