| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
|
||
| print("Задача-2") | ||
|
|
||
| class ravtrapetc: |
There was a problem hiding this comment.
имена классам даем в CamelCase стиле
Sorry, something went wrong.
| import math | ||
| len = math.sqrt((self.p2["x"] - self.p1["x"]) ** 2 + (self.p2["y"] - self.p1["y"]) ** 2) | ||
| return len | ||
| self.C = get_len(self.p1,self.p2) |
There was a problem hiding this comment.
неочень хорошая практика создавть атрибуты класса не в методе init, обратите внимание на то что данве строчки в студии подчеркиваются
Sorry, something went wrong.
| if A1 == A2: | ||
| return True | ||
| else: | ||
| return False |
There was a problem hiding this comment.
можно просто:
return A1 == A2
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Выполнил все