Skip to content
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

modul_4 #123

Open
wants to merge 42 commits into
base: main
Choose a base branch
from
Open

modul_4 #123

wants to merge 42 commits into from

Conversation

Ar87tem123456789101112
Copy link
Collaborator

No description provided.

markoffarteom_1987@mail.ru added 30 commits September 18, 2023 16:56
print(len(word)) # узнал сколько в слове символов

for el in range(len(word)): # перебрал слово в цикле
print(el,[0,7])
Copy link
Owner

Choose a reason for hiding this comment

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

Что такое [0, 7]?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

[0, 7] - это список, который мы перебираем.

Copy link
Owner

Choose a reason for hiding this comment

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

В задании требуется перебрать символы, которые у Вас записаны в переменной word.
Про перебор списка требования нет. Ну и собственно перебор этого списка здесь не делается. Просто вместе с каждой буквой слова "арзамас" зачем-то выводится "[0,7]".

print(el,[0,7])


if word[el] == "а": #проверили каждую букву на соответствие букве а
Copy link
Owner

Choose a reason for hiding this comment

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

Для чего нужна эта проверка с использованием el вне цикла?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

не могу ответить, уже не помню.

Copy link
Owner

Choose a reason for hiding this comment

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

Может быть, она просто не нужна? Тем более переменная el имеет смысл только внутри вышеуказанного цикла.

print(i)
if i % 15:
print("FizzBuzz")
else:
Copy link
Owner

Choose a reason for hiding this comment

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

Этот else должен относиться к вышестоящему if.

b = input("что - то понял, что - то нет: ")

while b != "хватит":
print(a[0])
Copy link
Owner

Choose a reason for hiding this comment

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

Теперь надо вместо 0 использовать переменную и менять её, как Вы это делали в файле modul4_2.py

Copy link
Owner

@IlyaOrlov IlyaOrlov left a comment

Choose a reason for hiding this comment

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

Оставил замечания.

Copy link
Owner

@IlyaOrlov IlyaOrlov left a comment

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.

None yet

2 participants