Skip to content

Lesson3 - #3

Open
iisat wants to merge 1 commit into
lesson2from
lesson3
Open

iisat wants to merge 1 commit into
lesson2from
lesson3

Conversation

@iisat

@iisat iisat commented Nov 7, 2018

Copy link
Copy Markdown
Owner

No description provided.

@Dzhoker1 Dzhoker1 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Оставил комментарии по коду

Comment thread Lesson3/task1.py
@@ -0,0 +1,23 @@
ans2 = ans3 = ans4 = ans5 = ans6 = ans7 = ans8 = ans9 =0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Отлично, но не оптимально по объёму написания кода

Comment thread Lesson3/task2.py
@@ -0,0 +1,14 @@
import random

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Отлично

Comment thread Lesson3/task3.py
@@ -0,0 +1,19 @@
import random

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Отличное решение

Comment thread Lesson3/task4.py
array.append(random.randint(0, RANGEMAX))

# Определяем массив счетчиков
countarray = [0] * (RANGEMAX + 1)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Представил задачу, где в массиве 10 чисел в диапазоне от нуля до миллиарда.
Неудачный алгоритм получается )))

Comment thread Lesson3/task5.py

#Выводим исходный массив
print(array)
minmax = RANGEMIN

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Алгоритм работает, когда вы точно знаете диапазон значений массива

Comment thread Lesson3/task6.py
@@ -0,0 +1,26 @@
import random

Copy link
Copy Markdown

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.

2 participants