Skip to content

Conversation

@SashaLesik
Copy link

No description provided.

1_if1.py Outdated
"""Главная функция"""


age = int(input("Введите свой возраст: "))

Choose a reason for hiding this comment

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

вся эта логика должна быть внутри функции

1_if1.py Outdated
age = int(input("Введите свой возраст: "))
if age < 6:
print("Вас ждет детский садик")
elif age >= 6 or age <= 18:

Choose a reason for hiding this comment

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

Оператор or проверяет истинность условий слева направо. При нахождении первого истинного условия дальнейшие проверки не вополяются. То есть в школьный возраст попадут вообще все числа >= 6

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