Skip to content

Conversation

@MeXaHu3M
Copy link

No description provided.

Copy link
Owner

Choose a reason for hiding this comment

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

нужно проще
for el in lst:
print(type(el))

Copy link
Owner

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.

'',
?? для чего

Copy link
Owner

Choose a reason for hiding this comment

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

month = int(input("Введите номер месяца: "))

my_lst = [
"Зима",
"Зима",
"Весна",
"Весна",
"Весна",
"Лето",
"Лето",
"Лето",
"Осень",
"Осень",
"Осень",
"Зима"]

print(f'Результат через список: {my_lst[month - 1]}')

my_dict = {1: "Зима", 2: "Зима", 3: "Весна", 4: "Весна", 5: "Весна",
6: "Лето", 7: "Лето", 8: "Лето", 9: "Осень", 10: "Осень",
11: "Осень", 12: "Зима"}

print(f'Результат через словарь: {my_dict.get(month)}')

Copy link
Owner

Choose a reason for hiding this comment

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

здесь нужна ф-ция enumerate

Copy link
Owner

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.

выполнено

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