Coding basics · 18 of 20
Count the even numbers
Return how many numbers in the list are even.
Jump to the editor ↓Examples
Input nums = [1, 2, 3, 4, 6]
Output 3
Input nums = [1, 3, 5]
Output 0
Coding basics · 18 of 20
Return how many numbers in the list are even.
Jump to the editor ↓Input nums = [1, 2, 3, 4, 6]
Output 3
Input nums = [1, 3, 5]
Output 0
Tab indents · ⌘/Ctrl+Enter runs · Esc leaves the editor