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

1st version #156

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

1st version #156

wants to merge 7 commits into from

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