year = int(input("Введите номер года: "))

animals = ["мышь", "бык", "барс", "заяц", "улитка", "змея", "лошадь", "овца", "обезьяна", "петух", "собака", "кабан"]

if year >= 1 and year <= 12:

print(animals[year - 1])

else:

print("Некорректный номер года")
The prompt seems to have a misunderstanding regarding the range of years. The list of animals corresponds to the Chinese zodiac, which cycles every 12 years. Here's the corrected code:
Python
year = int(input("Введите номер года: "))

animals = ["мышь", "бык", "барс", "заяц", "улитка", "змея", "лошадь", "овца", "обезьяна", "петух", "собака", "кабан"]

# Calculate the zodiac animal based on the year
zodiac_index = (year - 1) % 12

print(animals[zodiac_index])
кабан
This code will correctly output the corresponding animal for any given year.