Skip to content

task done#1

Open
sergech9 wants to merge 3 commits intomainfrom
develop
Open

task done#1
sergech9 wants to merge 3 commits intomainfrom
develop

Conversation

@sergech9
Copy link
Owner

No description provided.

task_1.py Outdated
total = []

for i in self.__name_items:
total.append(self.__name_items[i])
Copy link

Choose a reason for hiding this comment

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

TypeError: list indices must be integers or slices, not str - там нет цен чтобы их добавлять, нужно посмотреть в другом словаре

return self.twenty_percent_tax_calculation() + self.ten_percent_tax_calculation()

@staticmethod
def get_telephone_number(telephone_number):

This comment was marked as outdated.

if len(total) > 10:
return sum(total) * 0.9 * 0.1
else:
return sum(total) * 0.1
Copy link

Choose a reason for hiding this comment

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

пожалуйста проверь подсчеты налогов, неверно считает

Copy link

Choose a reason for hiding this comment

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

теперь все верно, молодец!

return f'+7{telephone_number}'

@staticmethod
def get_date_and_time():
Copy link

Choose a reason for hiding this comment

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

отлично: решено допзадание

task_1.py Outdated
if not isinstance(telephone_number, int):
raise ValueError('Необходимо ввести цифры')

if len(telephone_number) > 10:
Copy link

Choose a reason for hiding this comment

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

Для типа int не существует этого метода. Чтобы узнать длину телефона - нужно перевести тип в str и тогда можно будет применить метод len

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