Open
Conversation
Dzhoker1
reviewed
Aug 30, 2018
| @@ -0,0 +1,11 @@ | |||
| # 1. В диапазоне натуральных чисел от 2 до 99 определить, сколько из них кратны любому из чисел в диапазоне от 2 до 9. | |||
| @@ -0,0 +1,15 @@ | |||
| # 2. Во втором массиве сохранить индексы четных элементов первого массива. Например, если дан массив со значениями 8, 3, 15, 6, 4, 2, то | |||
| print(arr[i], end=' ') | ||
| print() | ||
|
|
||
| mn = min(arr) |
There was a problem hiding this comment.
Как не просил обойтись без min и `max, но всё равно все делают с ними )))
| @@ -0,0 +1,25 @@ | |||
| # 4. Определить, какое число в массиве встречается чаще всего. | |||
There was a problem hiding this comment.
Отлично. Я бы даже сказал, что это классика
| if arr[i] == arr[k]: | ||
| frq += 1 | ||
| if frq > max_frq: | ||
| max_frq = frq |
| index = -1 | ||
| while i < N: | ||
| if arr[i] < 0 and index == -1: | ||
| index = i |
There was a problem hiding this comment.
Так же нет стрелочек в блок-схеме. Впрочем, на оценку это не повлияет )))
| @@ -0,0 +1,28 @@ | |||
| # 6. В одномерном массиве найти сумму элементов, находящихся между минимальным и максимальным элементами. | |||
| @@ -0,0 +1,30 @@ | |||
| # 7. В одномерном массиве целых чисел определить два наименьших элемента. | |||
| s = 0 | ||
| print(f'{i} string:') | ||
| for j in range(M - 1): | ||
| n = int(input()) |
There was a problem hiding this comment.
Молчаливый input. Напомните озвучить всем на уроке, чтоб не делали такого )))
|
|
||
| mx = -1 | ||
| for j in range(M): | ||
| mn = 200 |
There was a problem hiding this comment.
Если в 11 строке изменить диапазон (например дописать в конце + 300, то уже не будет работать.
Ответ будет на уроке )))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Block-schemes:
https://drive.google.com/file/d/1yyVxEkRagoT2JX8j1JaWUFSuXF9Toigg/view?usp=sharing