Skip to content

Выполнение третьего задания#3

Open
silverAndr wants to merge 1 commit intomainfrom
lesson3
Open

Выполнение третьего задания#3
silverAndr wants to merge 1 commit intomainfrom
lesson3

Conversation

@silverAndr
Copy link
Owner

Не доделал 5 задачку, не могу придумать как (

my_list = str_numbers.split()
my_list = list(map(int, my_list))
return sum(my_list, my_sum)

Choose a reason for hiding this comment

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

надо было проверять каждый элемент и если он является символом выхода, то прекращать суммирование

Copy link
Owner Author

Choose a reason for hiding this comment

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

Да после разбора понял

r = r * x
y -= 1
return r

Choose a reason for hiding this comment

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

При возведении в отрицательную степень надо 1 разделить на результат

Copy link
Owner Author

Choose a reason for hiding this comment

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

про отрицательную совсем забыл. Надо вспоминать математику ))

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.

3 participants