FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Lesson06 by AlexN-github · Pull Request #887 · GeekBrainsTutorial/Python_lessons_basic · GitHub

Repository navigation

Lesson06 - #887

Open
AlexN-github wants to merge 9 commits into
GeekBrainsTutorial:masterfrom
AlexN-github:lesson06
Open

AlexN-github wants to merge 9 commits into
GeekBrainsTutorial:masterfrom
AlexN-github:lesson06

Conversation

Copy link
Copy Markdown

Выполнил все


print("Задача-2")

class ravtrapetc:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

имена классам даем в CamelCase стиле

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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

неочень хорошая практика создавть атрибуты класса не в методе init, обратите внимание на то что данве строчки в студии подчеркиваются

Comment on lines +85 to +88
if A1 == A2:
return True
else:
return False

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

можно просто:

return A1 == A2

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL