Carregando o exercício…
Given a list of integers nums, choose only the even numbers and add them together. If there are no even numbers, or if the list is empty, the sum is 0. Return the final total.
[1, 2, 3, 4, 5, 6]12[1, 3, 5]0[]0def sum_even(nums: list[int]) -> int:
Entre para ver seu histórico de envios
EntrarEntre para usar o AI Mentor
EntrarThey run when you press "Submit" — your whole solution is checked against them so you can't hard-code answers for the visible cases.