-
Notifications
You must be signed in to change notification settings - Fork 0
Lesson3 #3
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: lesson2
Are you sure you want to change the base?
Conversation
Dzhoker1
left a comment
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.
Оставил комментарии по коду
| @@ -0,0 +1,23 @@ | |||
| ans2 = ans3 = ans4 = ans5 = ans6 = ans7 = ans8 = ans9 =0 | |||
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.
Отлично, но не оптимально по объёму написания кода
| @@ -0,0 +1,14 @@ | |||
| import random | |||
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.
Отлично
| @@ -0,0 +1,19 @@ | |||
| import random | |||
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.
Отличное решение
| array.append(random.randint(0, RANGEMAX)) | ||
|
|
||
| # Определяем массив счетчиков | ||
| countarray = [0] * (RANGEMAX + 1) |
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.
Представил задачу, где в массиве 10 чисел в диапазоне от нуля до миллиарда.
Неудачный алгоритм получается )))
|
|
||
| #Выводим исходный массив | ||
| print(array) | ||
| minmax = RANGEMIN |
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.
Алгоритм работает, когда вы точно знаете диапазон значений массива
| @@ -0,0 +1,26 @@ | |||
| import random | |||
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.