Зареждане на задачата…
Counting even and odd numbers helps you quickly understand what a list is made of. The function count_even_odd receives a list of numbers nums and returns a list with two numbers. The first number is the count of even elements, and the second is the count of odd elements.
[1, 2, 3, 4][2, 2][][0, 0][2, 4, 6][3, 0]def count_even_odd(nums: list[int]) -> list[int]:
Влез, за да видиш историята на решенията
ВходВлез, за да използваш ИИ ментора
ВходThey run when you press "Submit" — your whole solution is checked against them so you can't hard-code answers for the visible cases.