-
Notifications
You must be signed in to change notification settings - Fork 0
lesson-2 is done #2
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?
Conversation
|
Hello @DoctorChe! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2019-05-21 07:48:39 UTC |
|
|
||
|
|
||
| print("\nРасчёт через рекурсию") | ||
| calc() |
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.
задание выполнено, отдельное спасибо за рекурсию
|
|
||
|
|
||
| print("\nРасчёт через рекурсию") | ||
| even_odd(input_number) |
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.
отлично, две реализации
| print(f"Обратное число {revers_recursion(number)}") | ||
|
|
||
| print("\nРасчёт через рекурсию") | ||
| print(f"Обратное число {revers_recursion(number)}") |
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.
супер
| print(f"Сумма {n} чисел из ряда 1 -0.5 0.25 -0.125 ... равна {sum_range_n(n)}") | ||
|
|
||
| print("\nРасчёт через рекурсию") | ||
| print(f"Сумма {n} чисел из ряда 1 -0.5 0.25 -0.125 ... равна {sum_range_n_recursion(n)}") |
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.
аналогично дев реализации
|
|
||
|
|
||
| print("\n\nРасчёт через рекурсию") | ||
| print_ascii_table() |
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.
спасибо. хорошо что любой перебор можно реализовать и циклом, и рекурсией
но надо помнить о ресурсах
|
|
||
| print("\nРасчёт через рекурсию") | ||
| rand_number = int(random() * max_number + 1) | ||
| guess_number_recursion(rand_number) |
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.
хорошо
| else: | ||
| print(f"1+2+...+{n} = {sum_range_n}") | ||
| print(f"n(n+1)/2 = {sum_n}") | ||
| print(f"1+2+...+{n} <> n(n+1)/2") |
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.
отлично
| print(f"Цифра {my_digit} встречается {loop(n, my_digit)} раз(а)") | ||
|
|
||
| print("\nРасчёт через рекурсию") | ||
| print(f"Цифра {my_digit} встречается {recursion(n, my_digit)} раз(а)") |
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.
здесь в принципе можно только циклом ограничиться
| print(f"Наибольшее число по сумме цифр {b}") | ||
| print(f"Сумма его цифр равна: {sum_digits_b}") | ||
| else: | ||
| print(f"Суммы цифр введённых чисел равны") |
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.
хорошо
No description provided.