Skip to content

030_lesson#3

Open
ikrugloff wants to merge 1 commit intomasterfrom
030_lesson
Open

030_lesson#3
ikrugloff wants to merge 1 commit intomasterfrom
030_lesson

Conversation

@ikrugloff
Copy link
Owner

@ikrugloff ikrugloff changed the title Add files via upload 030_lesson Aug 30, 2018
Copy link

@Dzhoker1 Dzhoker1 left a comment

Choose a reason for hiding this comment

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

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

@@ -0,0 +1,11 @@
# 1. В диапазоне натуральных чисел от 2 до 99 определить, сколько из них кратны любому из чисел в диапазоне от 2 до 9.

Choose a reason for hiding this comment

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

Отлично. И блок-схема тоже

@@ -0,0 +1,15 @@
# 2. Во втором массиве сохранить индексы четных элементов первого массива. Например, если дан массив со значениями 8, 3, 15, 6, 4, 2, то

Choose a reason for hiding this comment

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

Так же отлично

print(arr[i], end=' ')
print()

mn = min(arr)

Choose a reason for hiding this comment

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

Как не просил обойтись без min и `max, но всё равно все делают с ними )))

@@ -0,0 +1,25 @@
# 4. Определить, какое число в массиве встречается чаще всего.

Choose a reason for hiding this comment

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

Отлично. Я бы даже сказал, что это классика

if arr[i] == arr[k]:
frq += 1
if frq > max_frq:
max_frq = frq

Choose a reason for hiding this comment

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

Тут в блок-схеме потеряли стрелочку

index = -1
while i < N:
if arr[i] < 0 and index == -1:
index = i

Choose a reason for hiding this comment

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

Так же нет стрелочек в блок-схеме. Впрочем, на оценку это не повлияет )))

@@ -0,0 +1,28 @@
# 6. В одномерном массиве найти сумму элементов, находящихся между минимальным и максимальным элементами.

Choose a reason for hiding this comment

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

Отлично

@@ -0,0 +1,30 @@
# 7. В одномерном массиве целых чисел определить два наименьших элемента.

Choose a reason for hiding this comment

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

Классика. Отлично

s = 0
print(f'{i} string:')
for j in range(M - 1):
n = int(input())

Choose a reason for hiding this comment

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

Молчаливый input. Напомните озвучить всем на уроке, чтоб не делали такого )))


mx = -1
for j in range(M):
mn = 200

Choose a reason for hiding this comment

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

Если в 11 строке изменить диапазон (например дописать в конце + 300, то уже не будет работать.
Ответ будет на уроке )))

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